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 @@ -173,7 +173,7 @@ describe('reactivity/effect/scope', () => {
173
173
expect ( doubled ) . toBe ( undefined )
174
174
} )
175
175
176
- it ( 'should fire onDispose hook' , ( ) => {
176
+ it ( 'should fire onScopeDispose hook' , ( ) => {
177
177
let dummy = 0
178
178
179
179
const scope = new EffectScope ( )
@@ -192,7 +192,7 @@ describe('reactivity/effect/scope', () => {
192
192
expect ( dummy ) . toBe ( 7 )
193
193
} )
194
194
195
- it ( 'should warn onDispose () is called when there is no active effect scope' , ( ) => {
195
+ it ( 'should warn onScopeDispose () is called when there is no active effect scope' , ( ) => {
196
196
const spy = jest . fn ( )
197
197
const scope = new EffectScope ( )
198
198
scope . run ( ( ) => {
@@ -204,7 +204,7 @@ describe('reactivity/effect/scope', () => {
204
204
onScopeDispose ( spy )
205
205
206
206
expect (
207
- '[Vue warn] onDispose () is called when there is no active effect scope to be associated with.'
207
+ '[Vue warn] onScopeDispose () is called when there is no active effect scope to be associated with.'
208
208
) . toHaveBeenWarned ( )
209
209
210
210
scope . stop ( )
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export function onScopeDispose(fn: () => void) {
98
98
activeEffectScope . cleanups . push ( fn )
99
99
} else if ( __DEV__ ) {
100
100
warn (
101
- `onDispose () is called when there is no active effect scope` +
101
+ `onScopeDispose () is called when there is no active effect scope` +
102
102
` to be associated with.`
103
103
)
104
104
}
You can’t perform that action at this time.
0 commit comments