File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export function onScopeDispose(fn: () => void) {
102
102
activeEffectScope . cleanups . push ( fn )
103
103
} else if ( __DEV__ ) {
104
104
warn (
105
- `onDispose () is called when there is no active effect scope` +
105
+ `onScopeDispose () is called when there is no active effect scope` +
106
106
` to be associated with.`
107
107
)
108
108
}
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ describe('reactivity/effect/scope', () => {
190
190
expect ( doubled ) . toBe ( undefined )
191
191
} )
192
192
193
- it ( 'should fire onDispose hook' , ( ) => {
193
+ it ( 'should fire onScopeDispose hook' , ( ) => {
194
194
let dummy = 0
195
195
196
196
const scope = new EffectScope ( )
@@ -209,7 +209,7 @@ describe('reactivity/effect/scope', () => {
209
209
expect ( dummy ) . toBe ( 7 )
210
210
} )
211
211
212
- it ( 'should warn onDispose () is called when there is no active effect scope' , ( ) => {
212
+ it ( 'should warn onScopeDispose () is called when there is no active effect scope' , ( ) => {
213
213
const spy = jest . fn ( )
214
214
const scope = new EffectScope ( )
215
215
scope . run ( ( ) => {
@@ -221,7 +221,7 @@ describe('reactivity/effect/scope', () => {
221
221
onScopeDispose ( spy )
222
222
223
223
expect (
224
- '[Vue warn]: onDispose () is called when there is no active effect scope to be associated with.'
224
+ '[Vue warn]: onScopeDispose () is called when there is no active effect scope to be associated with.'
225
225
) . toHaveBeenWarned ( )
226
226
227
227
scope . stop ( )
You can’t perform that action at this time.
0 commit comments