diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
index c4cec4779bd..ee00977c131 100644
--- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
+++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
@@ -1785,45 +1785,45 @@ return { props, emit }
})"
`;
-exports[`SFC compile
- `)
- assertCode(content)
- expect(content).toMatch(`const slots = _useSlots()`)
- })
+ describe('defineSlots()', () => {
+ test('basic usage', () => {
+ const { content } = compile(`
+
+ `)
+ assertCode(content)
+ expect(content).toMatch(`const slots = _useSlots()`)
+ expect(content).not.toMatch('defineSlots')
+ })
- test('defineSlots w/o return value', () => {
- const { content } = compile(`
-
- `)
- assertCode(content)
- expect(content).not.toMatch(`_useSlots`)
- })
+ test('w/o return value', () => {
+ const { content } = compile(`
+
+ `)
+ assertCode(content)
+ expect(content).not.toMatch('defineSlots')
+ expect(content).not.toMatch(`_useSlots`)
+ })
- test('defineSlots w/o generic params', () => {
- const { content } = compile(`
-
- `)
- assertCode(content)
- expect(content).toMatch(`const slots = _useSlots()`)
+ test('w/o generic params', () => {
+ const { content } = compile(`
+
+ `)
+ assertCode(content)
+ expect(content).toMatch(`const slots = _useSlots()`)
+ expect(content).not.toMatch('defineSlots')
+ })
})
test('runtime Enum', () => {