[ARVADOS-WORKBENCH2] updated: 2.1.0-211-g6a66e260
Git user
git at public.arvados.org
Mon Feb 22 20:00:38 UTC 2021
Summary of changes:
src/services/common-service/common-service.test.ts | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
via 6a66e260c343d4943a68e5ca5ce205e83ba039c6 (commit)
from 0429d37860f633725ecff6bd923e196a61121881 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 6a66e260c343d4943a68e5ca5ce205e83ba039c6
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Mon Feb 22 16:59:40 2021 -0300
17319: Moved mocks' initializations into beforeEach().
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/services/common-service/common-service.test.ts b/src/services/common-service/common-service.test.ts
index db36570a..67547105 100644
--- a/src/services/common-service/common-service.test.ts
+++ b/src/services/common-service/common-service.test.ts
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import axios from "axios";
+import axios, { AxiosInstance } from "axios";
import { ApiActions } from "~/services/api/api-actions";
import { CommonService } from "./common-service";
@@ -12,9 +12,13 @@ const actions: ApiActions = {
};
describe("CommonService", () => {
- const axiosInstance = axios.create();
- // const axiosMock = new MockAdapter(axiosInstance);
- const commonService = new CommonService(axiosInstance, "resource", actions);
+ let axiosInstance: AxiosInstance;
+ let commonService: CommonService<any>;
+
+ beforeEach(() => {
+ commonService = new CommonService<any>(axiosInstance, "resource", actions);
+ axiosInstance = axios.create();
+ });
it("throws an exception when passing uuid as empty string to get()", () => {
expect(() => commonService.get("")).toThrowError("UUID cannot be empty string");
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list