spongy-runner
v0.2.0
Published
A utility package to write tests agnostic of test runner. Change the runner on the runtime.
Downloads
1
Readme
Spongy Runner
A utility package to write tests agnostic of test runner. Change the runner on the runtime.
Usage
Write test cases as following with consistent and simple interface.
import { describe, it } from "spongy-runner";
import assert from "node:assert";
describe("level 1", () => {
it("test 1.1", () => {
assert.strictEqual(1, 1);
});
it("test 1.2", () => {
assert.strictEqual(1, 1);
});
describe("level 2", () => {
it("test 2.1", () => {
assert.strictEqual(1, 1);
});
it("test 2.2", () => {
assert.strictEqual(1, 1);
});
})
});Now run the tets with mocha:
SPONGY_RUNNER=mocha mocha test/my-test.test.tsOr with Vitest
SPONGY_RUNNER=vitest vitest test/my-test.test.tsCurrently supported test runners are mocha and vitest.
Contributors
Read our contributors document, submit an issue or talk to us on our Discord!
