Skip to content

Commit

Permalink
fix: exported configDefaults has right type (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Apr 6, 2022
1 parent 6473fd4 commit 1696195
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vitest/src/defaults.ts
Expand Up @@ -33,11 +33,11 @@ const coverageConfigDefaults = {
extension: ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte'],
} as ResolvedC8Options

export const configDefaults: UserConfig = Object.freeze({
const config = {
allowOnly: !process.env.CI,
watch: !process.env.CI,
globals: false,
environment: 'node',
environment: 'node' as const,
threads: true,
clearMocks: false,
restoreMocks: false,
Expand All @@ -56,4 +56,6 @@ export const configDefaults: UserConfig = Object.freeze({
uiBase: '/__vitest__/',
open: true,
coverage: coverageConfigDefaults,
})
}

export const configDefaults: Required<Pick<UserConfig, keyof typeof config>> = Object.freeze(config)

0 comments on commit 1696195

Please sign in to comment.