
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
jenkins-mocha
Advanced tools
Single command to run your Mocha unit tests with both XUnit and LCov output (for Jenkins).
jenkins-mocha should be added to your test codebase as a dev dependency. You can do this with:
$ npm install --save-dev jenkins-mocha
Alternatively you can manually add it to your package.json file:
{
"devDependencies" : {
"jenkins-mocha": "latest"
}
}
then install with:
$ npm install --dev
jenkins-mocha should replace your mocha command in npm test
{
"scripts": {
"test": "jenkins-mocha test/*"
}
}
With coverage on (the default), you can pass a --cobertura
option to the command
to have nyc use the cobertura reporter
{
"scripts": {
"devtest": "jenkins-mocha --cobertura test/*"
}
}
If you want to turn coverage reporting off entirely, and just run unit tests with mocha,
you need to pass a --no-coverage
option to the command
{
"scripts": {
"devtest": "jenkins-mocha --no-coverage test/*"
}
}
Any other parameters added to the command will be passed directly to mocha.
If you need to configure nyc, you may create a .nycrc configuration file. Run nyc help config
for details.
If you want to configure how node is invoked (if you have a giant coverage file), you can set v8 arguments via $(NODE_ARGS)
.
{
"scripts": {
"test": "NODE_ARGS='--max_old_space_size=4096' jenkins-mocha test/*"
}
}
When npm-test is invoked, the module will:
$(TEST_DIR)
$(COVERAGE_DIR)
with a HTML report at $(COVERAGE_DIR)\lcov-report
Default values are:
$(ARTIFACTS_DIR) = ./artifacts
$(TEST_DIR) = ./$(ARTIFACTS_DIR)/test
$(COVERAGE_DIR) = ./$(ARTIFACTS_DIR)/coverage
FAQs
Bin wrapper for Mocha + Nyc + Xunit (for Jenkins)
The npm package jenkins-mocha receives a total of 6,573 weekly downloads. As such, jenkins-mocha popularity was classified as popular.
We found that jenkins-mocha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.