From d398fc08238616ae853008ae495ba0dfc8ab7aa1 Mon Sep 17 00:00:00 2001 From: wangcch Date: Wed, 17 Jul 2024 16:21:20 +0800 Subject: [PATCH] test(context): empty options(setUseRequestConfig) --- tests/context.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/context.test.ts b/tests/context.test.ts index 14960d2..25febd6 100644 --- a/tests/context.test.ts +++ b/tests/context.test.ts @@ -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() {