diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 065fb4c2..e824a50e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - run: corepack enable - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: pnpm - name: 📦 Install dependencies diff --git a/tests/nuxt/content-rich.test.ts b/tests/nuxt/content-rich.test.ts index 04266de5..e07a898d 100644 --- a/tests/nuxt/content-rich.test.ts +++ b/tests/nuxt/content-rich.test.ts @@ -211,6 +211,30 @@ vi.mock('vue-router', async () => { } }) +vi.mock('@vueuse/shared', async () => { + const vueuseShared = await import('@vueuse/shared') + // mock pausableWatch and watchPausable: vitest process hangs from time to time + return { + ...vueuseShared, + pausableWatch: () => { + return { + stop: () => {}, + pause: () => {}, + resume: () => {}, + isActive: readonly(ref(true)), + } + }, + watchPausable: () => { + return { + stop: () => {}, + pause: () => {}, + resume: () => {}, + isActive: readonly(ref(true)), + } + }, + } +}) + mockComponent('ContentMentionGroup', { setup(props, { slots }) { return () => h('mention-group', null, { default: () => slots?.default?.() }) diff --git a/vitest.config.ts b/vitest.config.ts index d8ff19ef..1c274a66 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -10,5 +10,13 @@ export default defineVitestConfig({ setupFiles: [ '/tests/setup.ts', ], + environmentOptions: { + nuxt: { + mock: { + indexedDb: true, + intersectionObserver: true, + }, + }, + }, }, })