fix(nuxt): export refreshCookie (#25635)

This commit is contained in:
Hendrik Heil 2024-02-05 21:25:11 +01:00 committed by GitHub
parent 460e0cfebd
commit 9af0e35ffc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ export { clearError, createError, isNuxtError, showError, useError } from './err
export type { NuxtError } from './error'
export { useFetch, useLazyFetch } from './fetch'
export type { FetchResult, UseFetchOptions } from './fetch'
export { useCookie } from './cookie'
export { useCookie, refreshCookie } from './cookie'
export type { CookieOptions, CookieRef } from './cookie'
export { prerenderRoutes, useRequestHeaders, useRequestEvent, useRequestFetch, setResponseStatus } from './ssr'
export { onNuxtReady } from './ready'

View File

@ -120,6 +120,7 @@ describe('composables', () => {
'preloadPayload',
'preloadRouteComponents',
'reloadNuxtApp',
'refreshCookie',
'useCookie',
'useFetch',
'useHead',
@ -625,7 +626,7 @@ describe('callOnce', () => {
const execute = () => callOnce(fn)
await Promise.all([execute(), execute(), execute()])
expect(fn).toHaveBeenCalledTimes(1)
const fnSync = vi.fn().mockImplementation(() => { })
const executeSync = () => callOnce(fnSync)
await Promise.all([executeSync(), executeSync(), executeSync()])