1
1
import type { AliasOptions , CommonServerOptions , DepOptimizationConfig } from 'vite'
2
2
import type { PrettyFormatOptions } from 'pretty-format'
3
3
import type { FakeTimerInstallOpts } from '@sinonjs/fake-timers'
4
+ import type { SequenceHooks , SequenceSetupFiles } from '@vitest/runner'
4
5
import type { BuiltinReporters } from '../node/reporters'
5
6
import type { TestSequencerConstructor } from '../node/sequencers/types'
6
7
import type { CoverageOptions , ResolvedCoverageOptions } from './coverage'
@@ -10,11 +11,12 @@ import type { SnapshotStateOptions } from './snapshot'
10
11
import type { Arrayable } from './general'
11
12
import type { BenchmarkUserOptions } from './benchmark'
12
13
14
+ export type { SequenceHooks , SequenceSetupFiles } from '@vitest/runner'
15
+
13
16
export type BuiltinEnvironment = 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime'
14
17
// Record is used, so user can get intellisense for builtin environments, but still allow custom environments
15
18
export type VitestEnvironment = BuiltinEnvironment | ( string & Record < never , never > )
16
19
export type CSSModuleScopeStrategy = 'stable' | 'scoped' | 'non-scoped'
17
- export type SequenceHooks = 'stack' | 'list' | 'parallel'
18
20
19
21
export type ApiConfig = Pick < CommonServerOptions , 'port' | 'strictPort' | 'host' >
20
22
@@ -498,6 +500,13 @@ export interface InlineConfig {
498
500
* @default false
499
501
*/
500
502
shuffle ?: boolean
503
+ /**
504
+ * Defines how setup files should be ordered
505
+ * - 'parallel' will run all setup files in parallel
506
+ * - 'list' will run all setup files in the order they are defined in the config file
507
+ * @default 'parallel'
508
+ */
509
+ setupFiles ?: SequenceSetupFiles
501
510
/**
502
511
* Seed for the random number generator.
503
512
* @default Date.now()
@@ -648,6 +657,7 @@ export interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'f
648
657
sequence : {
649
658
sequencer : TestSequencerConstructor
650
659
hooks : SequenceHooks
660
+ setupFiles : SequenceSetupFiles
651
661
shuffle ?: boolean
652
662
seed : number
653
663
}
0 commit comments