Skip to content

Commit

Permalink
fix: add missing testTimeout to initialProjectOptions (#14697)
Browse files Browse the repository at this point in the history
  • Loading branch information
RayBrokeSomething authored Nov 16, 2023
1 parent a3320c4 commit 9a1e647
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- `[jest-circus]` [**BREAKING**] Prevent false test failures caused by promise rejections handled asynchronously ([#14315](https://github.com/jestjs/jest/pull/14315))
- `[jest-circus, jest-expect, jest-snapshot]` Pass `test.failing` tests when containing failing snapshot matchers ([#14313](https://github.com/jestjs/jest/pull/14313))
- `[jest-config]` Make sure to respect `runInBand` option ([#14578](https://github.com/facebook/jest/pull/14578))
- `[jest-config]` Support `testTimeout` in project config ([#14697](https://github.com/facebook/jest/pull/14697))
- `[@jest/expect-utils]` Fix comparison of `DataView` ([#14408](https://github.com/jestjs/jest/pull/14408))
- `[@jest/expect-utils]` [**BREAKING**] exclude non-enumerable in object matching ([#14670](https://github.com/jestjs/jest/pull/14670))
- `[@jest/expect-utils]` Fix comparison of `URL` ([#14672](https://github.com/jestjs/jest/pull/14672))
Expand Down
1 change: 1 addition & 0 deletions packages/jest-config/src/ValidConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ export const initialProjectOptions: Config.InitialProjectOptions = {
],
),
testRunner: 'circus',
testTimeout: 5000,
transform: {
'\\.js$': '<rootDir>/preprocessor.js',
},
Expand Down
1 change: 1 addition & 0 deletions packages/jest-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ const groupOptions = (
testPathIgnorePatterns: options.testPathIgnorePatterns,
testRegex: options.testRegex,
testRunner: options.testRunner,
testTimeout: options.testTimeout,
transform: options.transform,
transformIgnorePatterns: options.transformIgnorePatterns,
unmockedModulePathPatterns: options.unmockedModulePathPatterns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exports[`prints the config object 1`] = `
"\\\\.test\\\\.js$"
],
"testRunner": "myRunner",
"testTimeout": 5000,
"transform": [],
"transformIgnorePatterns": [],
"waitNextEventLoopTurnForUnhandledRejectionEvents": false,
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/jest-types/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ export type ProjectConfig = {
testPathIgnorePatterns: Array<string>;
testRegex: Array<string | RegExp>;
testRunner: string;
testTimeout: number;
transform: Array<[string, string, Record<string, unknown>]>;
transformIgnorePatterns: Array<string>;
watchPathIgnorePatterns: Array<string>;
Expand Down
1 change: 1 addition & 0 deletions packages/test-utils/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = {
testPathIgnorePatterns: [],
testRegex: ['\\.test\\.js$'],
testRunner: 'jest-circus/runner',
testTimeout: 5000,
transform: [],
transformIgnorePatterns: [],
unmockedModulePathPatterns: undefined,
Expand Down

0 comments on commit 9a1e647

Please sign in to comment.