feat(vitest-config)!: Return the plain config object
Returning the plain config object instead of the result of defineConfig, allows for simpler modification/adaptation of the result. BREAKING CHANGE: You must wrap the result in defineConfig yourself now.
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
import { defineConfig } from 'vitest/config'
|
|
||||||
|
|
||||||
export const srcTestFolderConfig = function (baseUrl: string) {
|
export const srcTestFolderConfig = function (baseUrl: string) {
|
||||||
return defineConfig({
|
return {
|
||||||
test: {
|
test: {
|
||||||
alias: {
|
alias: {
|
||||||
'@/': decodeURI(new URL('./src/', baseUrl).pathname)
|
'@/': decodeURI(new URL('./src/', baseUrl).pathname)
|
||||||
},
|
},
|
||||||
dir: 'tests'
|
dir: 'tests'
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user