Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit b2abdfb

Browse files
test
1 parent e61f188 commit b2abdfb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/runtime-vapor/__tests__/dom/prop.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ import {
1414
setCurrentInstance,
1515
} from '../../src/component'
1616
import { getMetadata, recordPropMetadata } from '../../src/componentMetadata'
17+
import { getCurrentScope } from '@vue/reactivity'
1718

1819
let removeComponentInstance = NOOP
1920
beforeEach(() => {
2021
const instance = createComponentInstance((() => {}) as any, {}, null)
2122
const reset = setCurrentInstance(instance)
23+
const prev = getCurrentScope()
24+
instance.scope.on()
2225
removeComponentInstance = () => {
26+
instance.scope.prevScope.push(prev)
27+
instance.scope.off()
2328
reset()
2429
removeComponentInstance = NOOP
2530
}

0 commit comments

Comments
 (0)