mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 06:18:07 +09:00
chore(tests): fix vitest can't terminate worker (#2644)
This commit is contained in:
parent
edfbe2c3ed
commit
0fa87f71a4
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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?.() })
|
||||
|
@ -10,5 +10,13 @@ export default defineVitestConfig({
|
||||
setupFiles: [
|
||||
'/tests/setup.ts',
|
||||
],
|
||||
environmentOptions: {
|
||||
nuxt: {
|
||||
mock: {
|
||||
indexedDb: true,
|
||||
intersectionObserver: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user