Skip to content

Commit

Permalink
fixup: do something a little more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Apr 23, 2024
1 parent 6961573 commit 15a997b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/vite.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ const addBrowserCondition = (config) => {
*/
const addAutoCleanup = (config) => {
const test = config.test ?? {}
const setupFiles =
test.setupFiles !== undefined ? [test.setupFiles].flat() : []
let setupFiles = test.setupFiles ?? []

if (typeof setupFiles === 'string') {
setupFiles = [setupFiles]
}

setupFiles.push(join(dirname(fileURLToPath(import.meta.url)), './vitest.js'))

Expand Down

0 comments on commit 15a997b

Please sign in to comment.