Skip to content

Commit

Permalink
refactor: add missing options for timers on config.ts file (#10632)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftonato committed Oct 14, 2020
1 parent 50b534e commit e84a70c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
### Fixes

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

### Chore & Maintenance

Expand Down
8 changes: 5 additions & 3 deletions packages/jest-types/src/Config.ts
Expand Up @@ -11,6 +11,8 @@ import type {ForegroundColor} from 'chalk';

type CoverageProvider = 'babel' | 'v8';

type Timers = 'real' | 'fake' | 'modern' | 'legacy';

export type Path = string;

export type Glob = string;
Expand Down Expand Up @@ -92,7 +94,7 @@ export type DefaultOptions = {
testRunner: string;
testSequencer: string;
testURL: string;
timers: 'real' | 'fake';
timers: Timers;
transformIgnorePatterns: Array<Glob>;
useStderr: boolean;
watch: boolean;
Expand Down Expand Up @@ -206,7 +208,7 @@ export type InitialOptions = Partial<{
testSequencer: string;
testURL: string;
testTimeout: number;
timers: 'real' | 'fake';
timers: Timers;
transform: {
[regex: string]: Path | TransformerConfig;
};
Expand Down Expand Up @@ -362,7 +364,7 @@ export type ProjectConfig = {
testRegex: Array<string | RegExp>;
testRunner: string;
testURL: string;
timers: 'real' | 'fake' | 'modern' | 'legacy';
timers: Timers;
transform: Array<[string, Path, Record<string, unknown>]>;
transformIgnorePatterns: Array<Glob>;
watchPathIgnorePatterns: Array<string>;
Expand Down

0 comments on commit e84a70c

Please sign in to comment.