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

[Bug]: Unknown option testTimeout validation warning when used in project specific config #14513

Closed
saevarma opened this issue Sep 12, 2023 · 5 comments · Fixed by #14697
Closed

Comments

@saevarma
Copy link

Version

29.7.0

Steps to reproduce

Example steps (replace with your own):

  1. Clone my repo at https://github.com/saevarma/jest-testtimeout-repro/tree/main
  2. yarn
  3. yarn test --projects src/packages/sum/jest.config.ts
  4. You should see the validation warning displayed in terminal
● Validation Warning:

  Unknown option "testTimeout" with value 1 was found.
  This is probably a typing mistake. Fixing it will remove this message.

  Configuration Documentation:
  https://jestjs.io/docs/configuration

Expected behavior

No warning displayed in the terminal as this should be a known option.

Actual behavior

Validation warning displayed in terminal about unknown option, even though Jest respects and uses the value.

Additional context

No response

Environment

System:
    OS: macOS 13.4.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 18.16.0 - ~/.volta/tools/image/node/18.16.0/bin/node
    Yarn: 3.5.1 - ~/.volta/tools/image/yarn/4.0.0-rc.44/bin/yarn
    npm: 9.5.1 - ~/.volta/tools/image/node/18.16.0/bin/npm
  npmPackages:
    jest: ^29.7.0 => 29.7.0
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 12, 2023
@overbit
Copy link

overbit commented Oct 23, 2023

Any updates?

@github-actions github-actions bot removed the Stale label Oct 23, 2023
@saevarma
Copy link
Author

Fixed it in our repo by using yarn patch.

diff --git a/build/ValidConfig.js b/build/ValidConfig.js
index 0c1250c4da55984ef3ef0befb3bbf3c2133fe912..67e586e0f664629e18553927325f912c1b25a409 100644
--- a/build/ValidConfig.js
+++ b/build/ValidConfig.js
@@ -331,6 +331,7 @@ const initialProjectOptions = {
     ['/__tests__/\\.test\\.[jt]sx?$', '/__tests__/\\.spec\\.[jt]sx?$']
   ),
   testRunner: 'circus',
+  testTimeout: 5000,
   transform: {
     '\\.js$': '<rootDir>/preprocessor.js'
   },

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
@SimenB
Copy link
Member

SimenB commented Feb 20, 2024

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants