File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ export function shallowReactive(obj: any): any {
212
212
export function reactive < T extends object > ( obj : T ) : UnwrapRef < T > {
213
213
if ( ! isObject ( obj ) ) {
214
214
if ( __DEV__ ) {
215
- warn ( '"reactive()" is called without provide an " object" .' )
215
+ warn ( '"reactive()" must be called on an object.' )
216
216
}
217
217
return obj as any
218
218
}
Original file line number Diff line number Diff line change @@ -92,11 +92,11 @@ describe('api/reactive', () => {
92
92
warn = jest . spyOn ( global . console , 'error' ) . mockImplementation ( ( ) => null )
93
93
reactive ( )
94
94
expect ( warn . mock . calls [ 0 ] [ 0 ] ) . toMatch (
95
- '[Vue warn]: "reactive()" is called without provide an " object" .'
95
+ '[Vue warn]: "reactive()" must be called on an object.'
96
96
)
97
97
reactive ( false )
98
98
expect ( warn . mock . calls [ 1 ] [ 0 ] ) . toMatch (
99
- '[Vue warn]: "reactive()" is called without provide an " object" .'
99
+ '[Vue warn]: "reactive()" must be called on an object.'
100
100
)
101
101
expect ( warn ) . toBeCalledTimes ( 2 )
102
102
warn . mockRestore ( )
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ describe('reactivity/reactive', () => {
189
189
expect (
190
190
warn . mock . calls . map ( ( call ) => {
191
191
expect ( call [ 0 ] ) . toBe (
192
- '[Vue warn]: "reactive()" is called without provide an " object" .'
192
+ '[Vue warn]: "reactive()" must be called on an object.'
193
193
)
194
194
} )
195
195
)
@@ -266,7 +266,7 @@ describe('reactivity/reactive', () => {
266
266
expect (
267
267
warn . mock . calls . map ( ( call ) => {
268
268
expect ( call [ 0 ] ) . toBe (
269
- '[Vue warn]: "shallowReactive()" is called without provide an " object" .'
269
+ '[Vue warn]: "shallowReactive()" must be called on an object.'
270
270
)
271
271
} )
272
272
)
You can’t perform that action at this time.
0 commit comments