Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@build-chores/test
Advanced tools
@build-chores/test
Testing JS projects is complicated.
Use your custom Babel configuration with the AVA test runner and instrument code coverage using nyc.
Install the @build-chores/test
package into your project:
yarn install --dev @build-chores/test ava@1.0.0-beta.8
To make use of AVA add the following entry to your package.json
. It will use your local .babelrc
to compile your source code and use babel-plugin-istanbul
to instrument the code. See the example package.json
for a template.
{
"ava": {
"require": "@build-chores/test"
}
}
ava
is declared as a peer dependency. This means it has to be installed along the @build-chores/test
package. Make sure to install either ava@1.0.0-beta.8
or ava@next
tag. The default ava
package installs a very old version.
Configure code coverage by placing a .nycrc
in your project root. See the example .nycrc
for a template.
{
"sourceMap": false,
"instrument": true,
"all": true,
"include": [
"src/**/*.js"
]
}
Please note that in order for all
to work and instrument all source files, instrument
has to be set to true
.
Provide the test
and coverage
script targets to your package.json
. AVA sets your NODE_ENV
to test
automatically. See the example package.json
for a template.
{
"scripts": {
"test": "ava",
"test:coverage": "nyc yarn test",
"test:watch": "yarn test -w"
}
}
You are ready to test your files.
Check out our contributing.md to get started.
FAQs
Testing JS projects is complicated.
We found that @build-chores/test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.