2023-07-02 08:59:16 +00:00
|
|
|
import { defineVitestConfig } from 'nuxt-vitest/config'
|
2023-11-14 12:44:39 +00:00
|
|
|
import { coverageConfigDefaults } from 'vitest/config'
|
2023-07-02 08:59:16 +00:00
|
|
|
|
|
|
|
export default defineVitestConfig({
|
2023-09-19 21:31:18 +00:00
|
|
|
// TODO: investigate
|
|
|
|
define: {
|
|
|
|
'import.meta.test': true
|
|
|
|
},
|
2023-07-02 08:59:16 +00:00
|
|
|
test: {
|
|
|
|
dir: './test/nuxt',
|
2023-10-07 06:30:10 +00:00
|
|
|
environment: 'nuxt',
|
2023-11-14 12:44:39 +00:00
|
|
|
coverage: {
|
|
|
|
// TODO: remove when we upgrade to vitest 0.34.0: https://github.com/vitest-dev/vitest/pull/3794
|
|
|
|
exclude: [...coverageConfigDefaults.exclude, '**/virtual:nuxt:**'],
|
|
|
|
},
|
2023-10-07 06:30:10 +00:00
|
|
|
environmentOptions: {
|
|
|
|
nuxt: {
|
|
|
|
overrides: {
|
|
|
|
appConfig: {
|
|
|
|
nuxt: {
|
|
|
|
buildId: 'override'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-02 08:59:16 +00:00
|
|
|
}
|
|
|
|
})
|