Skip to content

Fix: Consistent Use of testTimeout in Jest Configurations #16568

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PrinceSajjadHussain
Copy link

The testTimeout property is used to define the maximum time a test can run before Jest considers it a failure. While some jest.config.js files define it (e.g., packages\cli\jest.config.js and packages\@n8n\ai-workflow-builder\jest.config.js), others do not. For consistency and to ensure tests do not run indefinitely, it is good practice to define a default testTimeout in the root jest.config.js so all packages inherit it.

Applied fixes:
--- a/jest.config.js
+++ b/jest.config.js
@@ -50,6 +50,7 @@
collectCoverage: isCoverageEnabled,
coverageReporters: ['text-summary', 'lcov', 'html-spa'],
workerIdleMemoryLimit: '1MB',

  • testTimeout: 5_000, // Default timeout for tests in milliseconds
    };

if (process.env.CI === 'true') {

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic reviewed 1 file and found no issues. Review PR in cubic.dev.

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

@PrinceSajjadHussain
Copy link
Author

please Approve it @tcurdt @marksteve @ceefour

@n8n-assistant n8n-assistant bot added community Authored by a community member in linear Issue or PR has been created in Linear for internal review labels Jun 20, 2025
@Joffcom
Copy link
Member

Joffcom commented Jun 20, 2025

Hey @PrinceSajjadHussain,

Thanks for the PR, We have created "GHC-2675" as the internal reference to get this reviewed.

One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team.

@Memoona-Qaiser
Copy link

👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants