17319: Don't use a real axios instance if not needed. 17319-service-layer-uuid-validation
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 22 Feb 2021 20:24:28 +0000 (17:24 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 22 Feb 2021 20:24:28 +0000 (17:24 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

src/services/common-service/common-service.test.ts

index 14a154767fbc2b93f08cfdb3778e360efeea4093..9a13d608a4ee631c60f33f7970f2641d0e31215c 100644 (file)
@@ -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";
 
@@ -15,7 +15,7 @@ describe("CommonService", () => {
     let commonService: CommonService<any>;
 
     beforeEach(() => {
-        commonService = new CommonService<any>(axios.create(), "resource", actions);
+        commonService = new CommonService<any>({} as AxiosInstance, "resource", actions);
     });
 
     it("throws an exception when passing uuid as empty string to get()", () => {