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:
T. R. Bernstein
2025-06-18 09:23:13 +02:00
parent 3b45d1fe75
commit 757066091a

View File

@@ -1,12 +1,10 @@
import { defineConfig } from 'vitest/config'
export const srcTestFolderConfig = function (baseUrl: string) {
return defineConfig({
return {
test: {
alias: {
'@/': decodeURI(new URL('./src/', baseUrl).pathname)
},
dir: 'tests'
}
})
}
}