
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@funboxteam/frontend-tests-runner
Advanced tools
A library for running Mocha tests in parallel and watching files changes in live mode.
npm install --save-dev @funboxteam/frontend-tests-runner
Example of usage:
const config = {
parallelTestsCount: 2,
testFiles: './src/tests/e2e/*.js',
project: {
build() {
// Build project function. Must return Promise.
},
addListener(event) {
// Even subscription function. There're two possible events
// buildStart — the project building has started;
// buildFinish — the project building has finished;
// Helpful for live testing.
}
}
};
const Runner = require('@funboxteam/frontend-tests-runner');
const runner = new Runner(config);
runner.start();
For more check examples directory.
Example of all configuration options and their defaults:
module.exports = {
// A number of files with tests running in parallel.
// Optional.
parallelTestsCount: 1,
// Run tests in live mode (enabling watching for files changes).
// Optional.
live: false,
// Write logs for each test file separately.
// Optional.
separatedLogs: false,
// Directory name for `separatedLogs`.
// Optional.
logDir: 'test-logs',
// Glob with tests files, for exampe: `tests/\*.js`.
// Required.
testFiles: undefined,
// Return test files for run. Function can be async.
// Optional.
filterTestsFiles: (files, isFilteredByOnly) => {
// e.g.:
// if (isFilteredByOnly) return files;
// const testsFilesDependencies = getTestsFilesDependencies(files);
// const changedFiles = getChangedFiles();
// return getAffectedTestsFiles(testsFilesDependencies, changedFiles);
},
project: {
build() {
// Build project function. Must return Promise.
},
addListener(event) {
// Event subscription function. There're two possible events:
// buildStart — the project building has started;
// buildFinish — the project building has finished.
// Helpful for live testing.
}
},
// Mocha config https://mochajs.org/#command-line-usage.
// Optional.
mocha: {
// Test timeout threshold (in milliseconds).
// https://mochajs.org/#-timeout-ms-t-ms
// Optional.
timeout: 30000,
// Retry failed tests this many times.
// https://mochajs.org/#-retries-n
// Optional.
retries: 0,
// Disable color output.
// https://mochajs.org/#-color-c-colors
// Optional.
noColors: false,
// Additional args object for Mocha.
// Optional.
args: {
// e.g.:
// '--full-trace': 'true',
// '--require': [
// '@babel/register',
// 'babel-polyfill',
// ],
},
},
}
5.0.0 (16.02.2023)
Updated Mocha to v10.2.0 to fix minimatch ReDoS vulnerability.
FAQs
A library for running Mocha tests in parallel
The npm package @funboxteam/frontend-tests-runner receives a total of 2 weekly downloads. As such, @funboxteam/frontend-tests-runner popularity was classified as not popular.
We found that @funboxteam/frontend-tests-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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.