mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-15 04:29:37 +01:00
chore(test): add setup
This commit is contained in:
9
test/nuxt/setup.ts
Normal file
9
test/nuxt/setup.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { mockNuxtImport } from '@nuxt/test-utils/runtime'
|
||||
|
||||
let id = 0
|
||||
|
||||
mockNuxtImport('useId', () => {
|
||||
return () => {
|
||||
return id++
|
||||
}
|
||||
})
|
||||
@@ -10,6 +10,7 @@ export default defineVitestConfig({
|
||||
nuxt: {
|
||||
rootDir: fileURLToPath(new URL('test/nuxt/', import.meta.url))
|
||||
}
|
||||
}
|
||||
},
|
||||
setupFiles: './setup.ts'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user