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]: makeTestResults fails with Maximum call stack size exceeded exception #14759

Closed
mbelsky opened this issue Dec 15, 2023 · 2 comments · Fixed by #14760
Closed

[Bug]: makeTestResults fails with Maximum call stack size exceeded exception #14759

mbelsky opened this issue Dec 15, 2023 · 2 comments · Fixed by #14760

Comments

@mbelsky
Copy link
Contributor

mbelsky commented Dec 15, 2023

Version

27.5.1

Steps to reproduce

Create a test file file.sppec.js with the following content and run yarn jest file.spec.js

describe('first level', () => {
  for (let j = 0; j < 200_000; j++) {
    it(`#${j}`, () => {
      expect(1).toBeTruthy();
    });
  }
});

Expected behavior

Jest execute the tests and print details

Actual behavior

Jest fails on results printing with the following error:

    RangeError: Maximum call stack size exceeded

      at makeTestResults (node_modules/jest-circus/build/utils.js:527:21)
      at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
      at runJest (node_modules/@jest/core/build/runJest.js:404:19)
      at _run10000 (node_modules/@jest/core/build/cli/index.js:320:7)
      at runCLI (node_modules/@jest/core/build/cli/index.js:173:3)

Additional context

No response

Environment

System:
    OS: macOS 14.1.2
    CPU: (8) arm64 Apple M2
  Binaries:
    Node: 20.4.0 - ~/Library/Caches/fnm_multishells/15759_1702555821872/bin/node
    Yarn: 3.1.0 - ~/Library/Caches/fnm_multishells/15759_1702555821872/bin/yarn
    npm: 9.8.1 - ~/xxx/zzz/node_modules/.bin/npm
    pnpm: 8.12.1 - ~/Library/Caches/fnm_multishells/15759_1702555821872/bin/pnpm
  npmPackages:
    jest: 27.4.7 => 27.4.7
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 Jan 27, 2024
@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.

2 participants