Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/reactivity/__tests__/effectScope.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('reactivity/effect/scope', () => {
expect(doubled).toBe(undefined)
})

it('should fire onDispose hook', () => {
it('should fire onScopeDispose hook', () => {
let dummy = 0

const scope = new EffectScope()
Expand All @@ -192,7 +192,7 @@ describe('reactivity/effect/scope', () => {
expect(dummy).toBe(7)
})

it('should warn onDispose() is called when there is no active effect scope', () => {
it('should warn onScopeDispose() is called when there is no active effect scope', () => {
const spy = jest.fn()
const scope = new EffectScope()
scope.run(() => {
Expand All @@ -204,7 +204,7 @@ describe('reactivity/effect/scope', () => {
onScopeDispose(spy)

expect(
'[Vue warn] onDispose() is called when there is no active effect scope to be associated with.'
'[Vue warn] onScopeDispose() is called when there is no active effect scope to be associated with.'
).toHaveBeenWarned()

scope.stop()
Expand Down
2 changes: 1 addition & 1 deletion packages/reactivity/src/effectScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function onScopeDispose(fn: () => void) {
activeEffectScope.cleanups.push(fn)
} else if (__DEV__) {
warn(
`onDispose() is called when there is no active effect scope` +
`onScopeDispose() is called when there is no active effect scope` +
` to be associated with.`
)
}
Expand Down