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

Files linted in random sequence #204

Closed
overlookmotel opened this issue Sep 2, 2023 · 1 comment · Fixed by #205
Closed

Files linted in random sequence #204

overlookmotel opened this issue Sep 2, 2023 · 1 comment · Fixed by #205

Comments

@overlookmotel
Copy link
Contributor

Jest normally runs test files in order of how long they took to run last time, with the longest-running first.

jest-runner-eslint doesn't seem to do this. Files are linted in a seemingly random order.

It appears that the runner is not outputting timing information to Jest, or for some reason Jest is not recording it. In Jest's cache folder, for a normal test run, there's a perf-cache file which records timings. e.g.:

{
  "/modules/foo/test/methods.test.js":[1,931],
  "/modules/foo/test/other.test.js":[1,2955]
}

The last number represents the number of milliseconds the test file took to run.

In comparison, the perf-cache file created after an jest-runner-eslint run:

{
  "/modules/foo/test/methods.test.js":[1,0],
  "/modules/foo/test/other.test.js":[1,0]
}

Every file has a recorded duration of 0, so Jest cannot sequence the files.

I'd be happy to make a PR if someone can point me in the right direction.

overlookmotel added a commit to overlookmotel/jest-runner-eslint that referenced this issue Sep 2, 2023
@overlookmotel
Copy link
Contributor Author

Actually it was really simple. Have submitted a PR #205.

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

Successfully merging a pull request may close this issue.

1 participant