Skip to content

Commit daa0026

Browse files
committed
test: update test for v3 defaults
1 parent db81f67 commit daa0026

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/nuxt/use-async-data.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ describe('useAsyncData', () => {
935935

936936
expect(promiseFn).toHaveBeenCalledTimes(2)
937937
expect(promiseFn).toHaveBeenLastCalledWith('2', 0)
938-
expect(error.value).toBe(undefined)
938+
expect(error.value).toBe(asyncDataDefaults.errorValue)
939939
expect(data.value).toBe('id: 2, page: 0')
940940

941941
// Verify params watcher continues to work after key change (issue #33777)
@@ -946,7 +946,7 @@ describe('useAsyncData', () => {
946946

947947
expect(promiseFn).toHaveBeenCalledTimes(3)
948948
expect(promiseFn).toHaveBeenLastCalledWith('2', 1)
949-
expect(error.value).toBe(undefined)
949+
expect(error.value).toBe(asyncDataDefaults.errorValue)
950950
expect(data.value).toBe('id: 2, page: 1')
951951

952952
// Another params change to be thorough
@@ -957,7 +957,7 @@ describe('useAsyncData', () => {
957957

958958
expect(promiseFn).toHaveBeenCalledTimes(4)
959959
expect(promiseFn).toHaveBeenLastCalledWith('2', 2)
960-
expect(error.value).toBe(undefined)
960+
expect(error.value).toBe(asyncDataDefaults.errorValue)
961961
expect(data.value).toBe('id: 2, page: 2')
962962
} finally {
963963
vi.useRealTimers()

0 commit comments

Comments
 (0)