Skip to content

Commit e84a70c

Browse files
authored
refactor: add missing options for timers on config.ts file (#10632)
1 parent 50b534e commit e84a70c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Fixes
88

99
- `[jest-runtime]` `require.main` is no longer `undefined` when using `jest.resetModules` ([#10626](https://github.com/facebook/jest/pull/10626))
10+
- `[@jest/types]` Add missing values for `timers` ([#10632](https://github.com/facebook/jest/pull/10632))
1011

1112
### Chore & Maintenance
1213

packages/jest-types/src/Config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import type {ForegroundColor} from 'chalk';
1111

1212
type CoverageProvider = 'babel' | 'v8';
1313

14+
type Timers = 'real' | 'fake' | 'modern' | 'legacy';
15+
1416
export type Path = string;
1517

1618
export type Glob = string;
@@ -92,7 +94,7 @@ export type DefaultOptions = {
9294
testRunner: string;
9395
testSequencer: string;
9496
testURL: string;
95-
timers: 'real' | 'fake';
97+
timers: Timers;
9698
transformIgnorePatterns: Array<Glob>;
9799
useStderr: boolean;
98100
watch: boolean;
@@ -206,7 +208,7 @@ export type InitialOptions = Partial<{
206208
testSequencer: string;
207209
testURL: string;
208210
testTimeout: number;
209-
timers: 'real' | 'fake';
211+
timers: Timers;
210212
transform: {
211213
[regex: string]: Path | TransformerConfig;
212214
};
@@ -362,7 +364,7 @@ export type ProjectConfig = {
362364
testRegex: Array<string | RegExp>;
363365
testRunner: string;
364366
testURL: string;
365-
timers: 'real' | 'fake' | 'modern' | 'legacy';
367+
timers: Timers;
366368
transform: Array<[string, Path, Record<string, unknown>]>;
367369
transformIgnorePatterns: Array<Glob>;
368370
watchPathIgnorePatterns: Array<string>;

0 commit comments

Comments
 (0)