question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to run test files in the same process

See original GitHub issue

Split from https://github.com/avajs/ava/issues/1322.

… add an option to not spawn AVA test files as child-processes. Pretty much what ava/profile.js does now. I also need this for testing Electron apps, as their tester needs to inject some globals. Having such option would also fix our React/etc performance issues.

It could be a global option that when turned on would run the test files in the same process in a new script context using the vm module instead of a child process.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
novemberborncommented, Jan 10, 2018

Prompted by #1631 it might be interesting to still start workers, but reuse them for different test files. We’d use vm for sandboxing. Would be good to check Jest’s sandboxing approach as well.

0reactions
novemberborncommented, May 25, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Run each test case in a separate process / better isolated ...
Currently, tests in a single test source file are run one after the other in the same process / context. One can use...
Read more >
Run VSTest tests in parallel - Azure Pipelines | Microsoft Learn
Continuous testing. Speed up testing by running tests in parallel using Visual Studio Test task.
Read more >
How do I test a single file using Jest? - node.js - Stack Overflow
Testing two or more specific files · Option 1: Command line. You can run the following command · Option 2: If you are...
Read more >
Multiple Ways To Execute JUnit Tests - Software Testing Help
Run only one test method in a class. Run through the command line. Run using Testrunner class file. Run using through Maven as...
Read more >
Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found