From 2187e94ddd06baf894a883af1f8e140367953d74 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 5 Nov 2020 22:16:02 +0100 Subject: [PATCH 1/3] feat: default values for global.config --- src/config.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index e62f23f36..898ce5a9c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,7 +4,7 @@ import { VueWrapper } from './vueWrapper' import { DOMWrapper } from './domWrapper' interface GlobalConfigOptions { - global: GlobalMountOptions + global: Required plugins: { VueWrapper: Pluggable> DOMWrapper: Pluggable> @@ -56,7 +56,15 @@ export const config: GlobalConfigOptions = { stubs: { transition: true, 'transition-group': true - } + }, + provide: {}, + components: {}, + config: {}, + directives: {}, + mixins: [], + mocks: {}, + plugins: [], + renderStubDefaultSlot: false }, plugins: { VueWrapper: new Pluggable(), From c3f6e1a5ffdb68f7e0d81a3e9527863bfdabe645 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Sun, 8 Nov 2020 22:44:20 +1000 Subject: [PATCH 2/3] chore: fix types in tests --- tests/config.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/config.spec.ts b/tests/config.spec.ts index 391a05d16..1e6111f79 100644 --- a/tests/config.spec.ts +++ b/tests/config.spec.ts @@ -5,12 +5,12 @@ import Hello from './components/Hello.vue' describe('config', () => { beforeEach(() => { config.global = { - components: undefined, - directives: undefined, - mixins: undefined, - plugins: undefined, - mocks: undefined, - provide: undefined + components: {}, + directives: {}, + mixins: [], + plugins: [], + mocks: {}, + provide: {} } jest.clearAllMocks() From 3b1fd8399999d91c816cc39289d12278939ef48a Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Sun, 8 Nov 2020 22:50:26 +1000 Subject: [PATCH 3/3] types: fix types --- tests/config.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/config.spec.ts b/tests/config.spec.ts index 1e6111f79..6338a3843 100644 --- a/tests/config.spec.ts +++ b/tests/config.spec.ts @@ -10,7 +10,10 @@ describe('config', () => { mixins: [], plugins: [], mocks: {}, - provide: {} + provide: {}, + stubs: {}, + config: {}, + renderStubDefaultSlot: false } jest.clearAllMocks()