mirror of https://github.com/vuejs/core.git
test: fix renderSlot tests
This commit is contained in:
parent
8610e1c9e2
commit
4e5897d2df
|
@ -10,8 +10,17 @@ import {
|
||||||
Slot
|
Slot
|
||||||
} from '../../src'
|
} from '../../src'
|
||||||
import { PatchFlags } from '@vue/shared'
|
import { PatchFlags } from '@vue/shared'
|
||||||
|
import { setCurrentRenderingInstance } from '../../src/componentRenderContext'
|
||||||
|
|
||||||
describe('renderSlot', () => {
|
describe('renderSlot', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
setCurrentRenderingInstance({ type: {} } as any)
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
setCurrentRenderingInstance(null)
|
||||||
|
})
|
||||||
|
|
||||||
it('should render slot', () => {
|
it('should render slot', () => {
|
||||||
let child
|
let child
|
||||||
const vnode = renderSlot(
|
const vnode = renderSlot(
|
||||||
|
|
Loading…
Reference in New Issue