@barelyhuman/mocha-to-tap

0.0.2 • Public • Published

@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

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @barelyhuman/mocha-to-tap

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

7.49 kB

Total Files

7

Last publish

Collaborators

  • barelyreaper