Skip to content

Commit

Permalink
chore: use helper function for merging vitest config (vuejs#8985)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue authored Oct 26, 2023
1 parent 1789c1c commit 6d7360d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions vitest.e2e.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { UserConfig } from 'vitest/config'
import { mergeConfig } from 'vitest/config'
import config from './vitest.config'

export default {
...config,
export default mergeConfig(config, {
test: {
...config.test,
include: ['packages/vue/__tests__/e2e/*.spec.ts']
}
} as UserConfig
})
8 changes: 3 additions & 5 deletions vitest.unit.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { UserConfig, configDefaults } from 'vitest/config'
import { configDefaults, mergeConfig } from 'vitest/config'
import config from './vitest.config'

export default {
...config,
export default mergeConfig(config, {
test: {
...config.test,
exclude: [...configDefaults.exclude, '**/e2e/**']
}
} as UserConfig
})

0 comments on commit 6d7360d

Please sign in to comment.