diff --git a/playground/app/multiCache.serverOptions.ts b/playground/app/multiCache.serverOptions.ts index 17fdefb..5b8b4de 100644 --- a/playground/app/multiCache.serverOptions.ts +++ b/playground/app/multiCache.serverOptions.ts @@ -1,6 +1,6 @@ import { defineDriver } from 'unstorage' import { H3Event, getQuery, getHeader } from 'h3' -import { defineMultiCacheOptions } from './../../src/module' +import { defineMultiCacheOptions } from './../../dist/runtime/serverOptions' const customDriver = defineDriver(() => { let cache: Record = {} diff --git a/test/spaMode.test.ts b/test/spaMode.test.ts index e3ada61..043f0f2 100644 --- a/test/spaMode.test.ts +++ b/test/spaMode.test.ts @@ -4,6 +4,7 @@ import { describe, expect, test } from 'vitest' import { NuxtMultiCacheOptions } from '../src/runtime/types' import purgeAll from './__helpers__/purgeAll' import purgeByKey from './__helpers__/purgeByKey' +import { sleep } from './__helpers__' describe('In SPA mode', async () => { const multiCache: NuxtMultiCacheOptions = { @@ -56,7 +57,8 @@ describe('In SPA mode', async () => { await purgeAll() const page = await createPage('/spaDataCache') + await sleep(1000) const text = await page.locator('#data-cache-value').innerText() - expect(text).toEqual('Success.') + expect(text).toEqual('Success') }) })