Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
stryker-jest-runner
Advanced tools
Readme
Install stryker-jest-runner locally within your project folder, like so:
npm i --save-dev stryker-jest-runner
The stryker-jest-runner is a plugin for Stryker to enable Jest as a test runner. As such, you should make sure you have the correct versions of its dependencies installed:
For the minimum supported versions, see the peerDependencies section in package.json.
Make sure you set the testRunner
option to "jest" and set coverageAnalysis
to "off" in your Stryker configuration.
{
testRunner: 'jest'
coverageAnalysis: 'off'
}
The stryker-jest-runner also provides a couple of configurable options using the jest
property in your Stryker config:
{
jest: {
projectType: 'custom',
config: require('path/to/your/custom/jestConfig.js'),
enableFindRelatedTests: true,
}
}
option | description | default value | alternative values |
---|---|---|---|
projectType (optional) | The type of project you are working on. | default | default uses the config option (see below) |
react when you are using create-react-app | |||
react-ts when you are using create-react-app-typescript | |||
config (optional) | A custom Jest configuration object. You could also use require to load it here) | undefined | |
enableFindRelatedTests (optional) | Whether to run jest with the --findRelatedTests flag. When true , Jest will only run tests related to the mutated file per test. (See --findRelatedTests) | true | false |
Note: When neither of the options are specified it will use the Jest configuration in your "package.json".
Note: the projectType
option is ignored when the config
option is specified.
Note: Stryker currently only works for CRA-projects that have not been ejected.
The following is an example stryker.conf.js file:
module.exports = function(config) {
config.set({
testRunner: "jest",
mutator: "javascript",
coverageAnalysis: "off",
mutate: ["src/**/*.js"]
});
};
For more information on what these options mean, take a look at the Stryker readme.
In order to use the stryker-jest-runner
it must be loaded in the Stryker mutation testing framework via the Stryker configuration. The easiest way to achieve this, is not have a plugins section in your config file. That way, all node_modules starting with stryker-
will be loaded.
Make sure to read the Stryker contribution guidelines located in the Stryker mono repository.
FAQs
A plugin to use the jest test runner and framework in Stryker, the JavaScript mutation testing framework
The npm package stryker-jest-runner receives a total of 206 weekly downloads. As such, stryker-jest-runner popularity was classified as not popular.
We found that stryker-jest-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.