Skip to content

Commit 08f2224

Browse files
committed
test: update assertion for pendingWhenIdle
1 parent 915fae2 commit 08f2224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/nuxt/composables.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { useRouteAnnouncer } from '#app/composables/route-announcer'
2323
import { encodeURL, resolveRouteObject } from '#app/composables/router'
2424
import { useRuntimeHook } from '#app/composables/runtime-hook'
2525

26-
import { asyncDataDefaults, nuxtDefaultErrorValue } from '#build/nuxt.config.mjs'
26+
import { asyncDataDefaults, nuxtDefaultErrorValue, pendingWhenIdle } from '#build/nuxt.config.mjs'
2727

2828
registerEndpoint('/api/test', defineEventHandler(event => ({
2929
method: event.method,
@@ -182,7 +182,7 @@ describe('useAsyncData', () => {
182182
const nonimmediate = await useAsyncData(() => Promise.resolve('test'), { immediate: false })
183183
expect(nonimmediate.data.value).toBe(asyncDataDefaults.value)
184184
expect(nonimmediate.status.value).toBe('idle')
185-
expect(nonimmediate.pending.value).toBe(false)
185+
expect(nonimmediate.pending.value).toBe(pendingWhenIdle)
186186
})
187187

188188
it('should capture errors', async () => {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy