//
// SPDX-License-Identifier: AGPL-3.0
-import axios from "axios";
-import { ApiActions } from "~/services/api/api-actions";
+import axios, { AxiosInstance } from "axios";
+import { ApiActions } from "services/api/api-actions";
import { CommonService } from "./common-service";
const actions: ApiActions = {
};
describe("CommonService", () => {
- const axiosInstance = axios.create();
- // const axiosMock = new MockAdapter(axiosInstance);
- const commonService = new CommonService(axiosInstance, "resource", actions);
+ let commonService: CommonService<any>;
+
+ beforeEach(() => {
+ commonService = new CommonService<any>({} as AxiosInstance, "resource", actions);
+ });
it("throws an exception when passing uuid as empty string to get()", () => {
expect(() => commonService.get("")).toThrowError("UUID cannot be empty string");