@hyperpackai/hypertest
v0.3.0
Published
HyperTest — blazing-fast test runner with worker threads, snapshots, V8 coverage, and jsdom/happy-dom support.
Downloads
416
Maintainers
Readme
@hyperpackai/hypertest
HyperTest — blazing-fast test runner built for HyperPack projects.
Install
npm install -D @hyperpackai/hypertestRun
npx hypertest
npx hypertest --watch
npx hypertest --coverage
npx hypertest --environment jsdom
npx hypertest --workers 4Example
describe("math", () => {
test("adds", () => {
expect(1 + 1).toBe(2);
});
test("mocks", () => {
const add = fn<(a: number, b: number) => number>().mockReturnValue(42);
expect(add(1, 2)).toBe(42);
expect(add).toHaveBeenCalledWith(1, 2);
});
test.each([[1,1,2],[2,3,5]])("adds %d + %d = %d", (a, b, expected) => {
expect(a + b).toBe(expected);
});
});Requirements
Node.js ≥ 20
