From 9c025c968dbe8bb7b1617fa6c92cd5d2487cdebb Mon Sep 17 00:00:00 2001 From: Nick Yashin Date: Fri, 9 Nov 2018 13:45:19 +0100 Subject: [PATCH 1/2] fix scoped slots typing add test for function --- packages/test-utils/types/index.d.ts | 2 +- packages/test-utils/types/test/shallow.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/test-utils/types/index.d.ts b/packages/test-utils/types/index.d.ts index 6d2928884..b81c4cc7d 100644 --- a/packages/test-utils/types/index.d.ts +++ b/packages/test-utils/types/index.d.ts @@ -132,7 +132,7 @@ interface MountOptions extends ComponentOptions { mocks?: object | false parentComponent?: Component slots?: Slots - scopedSlots?: Record + scopedSlots?: Record stubs?: Stubs | false, attrs?: Record listeners?: Record diff --git a/packages/test-utils/types/test/shallow.ts b/packages/test-utils/types/test/shallow.ts index 60636a3ea..75afaa900 100644 --- a/packages/test-utils/types/test/shallow.ts +++ b/packages/test-utils/types/test/shallow.ts @@ -1,5 +1,5 @@ import Vuex from 'vuex' -import { shallowMount, createLocalVue } from '../' +import { shallowMount, createLocalVue } from '..' import { normalOptions, functionalOptions, ClassComponent } from './resources' /** @@ -33,6 +33,12 @@ shallowMount(ClassComponent, { foo: [normalOptions, functionalOptions], baz: ClassComponent }, + scopedSlots: { + scopedFoo: `
scopedFoo
`, + scopedBaz() { + return `
scopedBaz
`; + }, + }, stubs: { foo: normalOptions, bar: functionalOptions, From b40d12b07456c668605e157d389640d6bd41d1d3 Mon Sep 17 00:00:00 2001 From: Nick Yashin Date: Fri, 9 Nov 2018 13:53:23 +0100 Subject: [PATCH 2/2] revert import path --- packages/test-utils/types/test/shallow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/test-utils/types/test/shallow.ts b/packages/test-utils/types/test/shallow.ts index 75afaa900..d8e96d787 100644 --- a/packages/test-utils/types/test/shallow.ts +++ b/packages/test-utils/types/test/shallow.ts @@ -1,5 +1,5 @@ import Vuex from 'vuex' -import { shallowMount, createLocalVue } from '..' +import { shallowMount, createLocalVue } from '../' import { normalOptions, functionalOptions, ClassComponent } from './resources' /**