Skip to content

Commit 4e5897d

Browse files
committed
test: fix renderSlot tests
1 parent 8610e1c commit 4e5897d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/runtime-core/__tests__/helpers/renderSlot.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ import {
1010
Slot
1111
} from '../../src'
1212
import { PatchFlags } from '@vue/shared'
13+
import { setCurrentRenderingInstance } from '../../src/componentRenderContext'
1314

1415
describe('renderSlot', () => {
16+
beforeEach(() => {
17+
setCurrentRenderingInstance({ type: {} } as any)
18+
})
19+
20+
afterEach(() => {
21+
setCurrentRenderingInstance(null)
22+
})
23+
1524
it('should render slot', () => {
1625
let child
1726
const vnode = renderSlot(

0 commit comments

Comments
 (0)