
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
test-director
Advanced tools
An ultra lightweight unit test director for Node.js.
Works well with any assertion library that throws errors, such as the Node.js assert API and snapshot-assertion.
Use coverage-node to run your test script and report code coverage.
To install test-director with npm, run:
npm install test-director --save-dev
Then, import and use the class TestDirector.
A sync test:
import { equal } from "node:assert";
import TestDirector from "test-director";
const tests = new TestDirector();
tests.add("JavaScript addition.", () => {
equal(1 + 1, 2);
});
tests.run();
An async test:
import { ok } from "node:assert";
import TestDirector from "test-director";
const tests = new TestDirector();
tests.add("GitHub is up.", async () => {
const response = await fetch("https://github.com");
ok(response.ok);
});
tests.run();
Nested tests:
import TestDirector from "test-director";
const tests = new TestDirector();
tests.add("Test A.", async () => {
const tests = new TestDirector();
tests.add("Test B.", () => {
// …
});
tests.add("Test C.", () => {
// …
});
await tests.run(true);
});
tests.add("Test D.", () => {
// …
});
tests.run();
Supported runtime environments:
^16.9.0 || >= 18.0.0.Projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check comment:
compilerOptions.allowJs should be true.compilerOptions.maxNodeModuleJsDepth should be reasonably large, e.g. 10.compilerOptions.module should be "node16" or "nodenext".The npm package test-director features optimal JavaScript module design. These ECMAScript modules are exported via the package.json field exports:
FAQs
An ultra lightweight unit test director for Node.js.
We found that test-director 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.