Skip to content

Commit

Permalink
fix(nuxt): export refreshCookie (#25635)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikheil committed Feb 5, 2024
1 parent 460e0cf commit 9af0e35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/composables/index.ts
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion test/nuxt/composables.test.ts
Expand Up @@ -120,6 +120,7 @@ describe('composables', () => {
'preloadPayload',
'preloadRouteComponents',
'reloadNuxtApp',
'refreshCookie',
'useCookie',
'useFetch',
'useHead',
Expand Down Expand Up @@ -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()])
Expand Down

0 comments on commit 9af0e35

Please sign in to comment.