Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add missing options for timers on config.ts file #10632

Merged
merged 3 commits into from
Oct 14, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/jest-types/src/Config.ts
Original file line number Diff line number Diff line change
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