Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
jest-serial-runner
Advanced tools
Extending the Jest default runner to run tests serially by default
jest-serial-runner
Extending the Jest default runner to run tests serially by default
Simple wrapper over the default Jest runner that forces serial execution of test files. This is equivalent to running with --runInBand
flag by default.
Why? Sometimes you have limited/restricted resources on the test machine (like in a docker container) and running the default jest-runner
always runs in parallel unless specified otherwise. Integration tests are another scenario where running concurrent instances causes issues so using this runner ensures only 1 test runs at a time.
npm install jest-serial-runner --save-dev
Option 1: Specify the runner in your Jest
config
/* jest.config.json */
{
// ...
"runner": "jest-serial-runner"
// ...
}
Option 2: To specify the runner for a subset of files such as for integration tests.
/* jest.config.js */
module.exports = {
// ...
projects: [
{
// Uses the jest default runner for specification testing
displayName: "UNIT",
testMatch: ["<rootDir>/src/**/__tests__/*.spec.ts"]
},
{
// Uses the serial runner instead for integration test files
displayName: "INTEGRATION",
runner: "jest-serial-runner",
testMatch: ["<rootDir>/tests/**/*.integration-test.ts"]
}
]
}
Thank you to all of our contributors!
PR's & Issue contributions welcome! Please adhere to contributing guidelines or your submission will be closed or delayed.
FAQs
Extending the Jest default runner to run tests serially by default
The npm package jest-serial-runner receives a total of 13,449 weekly downloads. As such, jest-serial-runner popularity was classified as popular.
We found that jest-serial-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.