
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.
xUnit style test cases, suites, and runner for Node's assert module. Inspired by Ruby's MiniTest::Unit.
MiniUnit is only intended to help you structure your tests, it is expected you'll be using it with the Node.js assert module for assertions.
// require MiniUnit and Node's assert module
var MiniUnit = require("mini-unit");
var assert = require("assert");
// require the module under test
var MyModule = require("./../lib/my-module");
// create and name a test case
var tc = new MiniUnit.TestCase("MyModule");
// run before each test
tc.setup = function () {
this.adder = new MyModule.adder();
};
// run after each test
tc.teardown = function () {
this.adder.reset();
};
// test methods must be named 'test' followed by at least one character.
tc.testAddition = function () {
var a = 2,
b = 2,
result,
result = this.adder.add(a, b)
assert.equal(result, 4);
};
// if the file being run is the current file, then run the tests, otherwise
// export the test case
if (require.main === module) {
MiniUnit.run(tc);
} else {
module.exports = tc;
}
var MiniUnit = require("mini-unit");
var testCases = [
"./foo",
"./bar"
].map(function (path) {
return require(path);
});
MiniUnit.runSuit(testCases);
FAQs
xUnit style test cases, suites, and runner for Node's assert module.
We found that mini-unit 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.