Skip to content

Commit

Permalink
test(context): empty options(setUseRequestConfig)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcch committed Jul 17, 2024
1 parent 01f9c17 commit 7ca075c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ describe("context", () => {
});
});

test("setUseRequestConfig empty options", () => {
const Component = defineComponent({
setup() {
const { instance } = getUseRequestConfig();
expect(instance).toBe(axios);

return () => h("div");
},
});

mount(Component, (app) => {
setUseRequestConfig(app);
});
});

test("setUseRequestConfig (vue 2)", () => {
const Component = defineComponent2({
setup() {
Expand Down

0 comments on commit 7ca075c

Please sign in to comment.