@barelyhuman/mocha-to-tap
v0.0.2
Published
Simple CLI/Node program to convert `@tapjs/mocha-global` tests to tap nested tests.
Downloads
4
Readme
@barelyhuman/mocha-to-tap
Simple CLI/Node program to convert @tapjs/mocha-global
tests to tap nested tests.
describe("test", () => {
describe("inner test", () => {
describe("inner inner test", () => {
it("why even check now", () => {});
});
});
});
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
t.test("test", async (t) => {
t.test("inner test", async (t) => {
t.test("inner inner test", async (t) => {
t.test("why even check now", async (t) => {});
});
});
});
Usage
; npm i -g @barelyhuman/mocha-to-tap
; mocha-to-tap '**/*.js'
# or
; npx -p @barelyhuman/mocha-to-tap mocha-to-tap '**/*.js'
CLI Reference
Usage
$ mocha-to-tap <glob> [options]
Options
-d, --dry Dry Run
-j, --jobs Number of parallel transforms to run (default 10)
-v, --version Displays current version
-h, --help Displays this message
Examples
$ mocha-to-tap ./**/*.spec.js