
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
testsome is a small JavaScript test runner without any dependencies.
To run a test with testsome, a test function is provided. It takes the test's name and a function which will be called:
function test(name: string, func: (t: T) => void): void
The passed function func gets a parameter of type T which can be used to manage test state:
interface T {
skip(): void;
fail(): void;
error(msg?: string): void;
fatal(msg?: string): void;
run(name: string, func: TestFunc): boolean;
}
The skip method marks the test as skipped and stops its execution.
The fail method marks the test as failed and continues it execution.
The error method reports an optional error message and marks the test as failed. If no msg parameter is provided, this function will be equivalent to calling fail.
The fatal method reports an optional error message and stops the test execution. This function is equivalent to calling error followed by returning from the test function.
The run method start a subtest with the provided name. It basically has the same semantics as the test function. The return value reports whether the subtest succeeded or not.
testsome [options] [file ...]
Run all tests which are defined in the provided files. A file could also be a glob pattern,
which includes every file the pattern matches.
Options:
--run regexp
Run only the test where the name matches the regular expression. All other will be ignored.
The regular expression is split into parts by unbracketed slashes where each part must match
the corresponding subtest. All parents of a matching test are run, too. For example, for
'--run A/B' runs the test A with its subtests matching B.
test.js
import {test} from "testsome";
test("my first test", t => {
if(!initializeTest()) {
t.fatal("cannot initialize test");
}
t.run("subtest", t => {
if(somethingIsWrong) {
t.error("something went wrong");
}
});
});
command line
testsome test.js
FAQs
A minimal test runner.
We found that testsome 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.