Skip to content

Commit df16c13

Browse files
committed
chore: fix test
1 parent a4d5979 commit df16c13

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/reactivity/reactive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function shallowReactive(obj: any): any {
212212
export function reactive<T extends object>(obj: T): UnwrapRef<T> {
213213
if (!isObject(obj)) {
214214
if (__DEV__) {
215-
warn('"reactive()" is called without provide an "object".')
215+
warn('"reactive()" must be called on an object.')
216216
}
217217
return obj as any
218218
}

test/apis/state.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ describe('api/reactive', () => {
9292
warn = jest.spyOn(global.console, 'error').mockImplementation(() => null)
9393
reactive()
9494
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.'
9696
)
9797
reactive(false)
9898
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.'
100100
)
101101
expect(warn).toBeCalledTimes(2)
102102
warn.mockRestore()

test/v3/reactivity/reactive.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('reactivity/reactive', () => {
189189
expect(
190190
warn.mock.calls.map((call) => {
191191
expect(call[0]).toBe(
192-
'[Vue warn]: "reactive()" is called without provide an "object".'
192+
'[Vue warn]: "reactive()" must be called on an object.'
193193
)
194194
})
195195
)
@@ -266,7 +266,7 @@ describe('reactivity/reactive', () => {
266266
expect(
267267
warn.mock.calls.map((call) => {
268268
expect(call[0]).toBe(
269-
'[Vue warn]: "shallowReactive()" is called without provide an "object".'
269+
'[Vue warn]: "shallowReactive()" must be called on an object.'
270270
)
271271
})
272272
)

0 commit comments

Comments
 (0)