From 59653ac047069db24bb67f807bf4a67418f183eb Mon Sep 17 00:00:00 2001 From: webfansplz <308241863@qq.com> Date: Tue, 17 Aug 2021 11:09:23 +0800 Subject: [PATCH] fix: typos (#788) Co-authored-by: webfansplz <> --- src/apis/effectScope.ts | 2 +- test/v3/reactivity/effectScope.spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apis/effectScope.ts b/src/apis/effectScope.ts index 657276f0..cde52c5c 100644 --- a/src/apis/effectScope.ts +++ b/src/apis/effectScope.ts @@ -102,7 +102,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.` ) } diff --git a/test/v3/reactivity/effectScope.spec.ts b/test/v3/reactivity/effectScope.spec.ts index ec5a5e8e..f50a4b3f 100644 --- a/test/v3/reactivity/effectScope.spec.ts +++ b/test/v3/reactivity/effectScope.spec.ts @@ -190,7 +190,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() @@ -209,7 +209,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(() => { @@ -221,7 +221,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()