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 25, 2024
1 parent c8b5375 commit d398fc0
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 d398fc0

Please sign in to comment.