From 8db0c20e34b74a057adf8baff56d3074c2af05db Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 9 Nov 2018 14:10:03 +0100 Subject: [PATCH] fix: add functions to scoped slots typing (#1022) --- packages/test-utils/types/index.d.ts | 2 +- packages/test-utils/types/test/shallow.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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..d8e96d787 100644 --- a/packages/test-utils/types/test/shallow.ts +++ b/packages/test-utils/types/test/shallow.ts @@ -33,6 +33,12 @@ shallowMount(ClassComponent, { foo: [normalOptions, functionalOptions], baz: ClassComponent }, + scopedSlots: { + scopedFoo: `
scopedFoo
`, + scopedBaz() { + return `
scopedBaz
`; + }, + }, stubs: { foo: normalOptions, bar: functionalOptions,