Skip to content

Commit acb08eb

Browse files
fix failing jests: mock useConfig
1 parent bd3aa23 commit acb08eb

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

client/src/components/Citation/services.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ const mockCitationResponseJson = [
1313
},
1414
];
1515

16+
jest.mock("@/composables/config", () => ({
17+
useConfig: jest.fn(() => ({
18+
config: {
19+
value: {},
20+
},
21+
})),
22+
}));
23+
1624
describe("Citation", () => {
1725
let axiosMock: MockAdapter;
1826

client/src/components/Tool/ToolFooter.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ const localVue = getLocalVue(true);
1111
const citationsA = [{ format: "bibtex", content: "@misc{entry_a, year = {1111}}" }];
1212
const citationsB = [{ format: "bibtex", content: "@misc{entry_b, year = {2222}}" }];
1313

14+
jest.mock("@/composables/config", () => ({
15+
useConfig: jest.fn(() => ({
16+
config: {
17+
value: {},
18+
},
19+
})),
20+
}));
21+
1422
describe("ToolFooter", () => {
1523
let wrapper;
1624
let axiosMock;

0 commit comments

Comments
 (0)