0.2.3 • Published 11 months ago

mintest-green v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

mintest-green

Fully typed minimalistic test-runner.

Heavily inspired by baretest.

Content

What is this?

This package is a minimalistic and blazing fast test-runner, completely written in TypeScript.

When should I use this?

If the startup time of Jest bothers you and the notation and lack of types in baretest bothers you, too.

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:

npm install mintest-green

Use

import { assert, describe } from './mintest';

let count = 0;
function incr() {
  count++;
}

await describe('mintest', function (test) {
  test.beforeEach(incr);

  test('Foo', function () {
    assert.equal(2 + 2, 4);
  });
  test('Bar', function () {
    assert.equal(2 + 2, 4, 'Oh no!');
  });
  test.skip('Baz', function () {
    assert.equal(2 + 2, 5, 'This does not matter');
  });
});

assert.equal(count, 2);

describe is an async function in which you can describe your unit under test. Use the test util and its sub-features to do that.

This is still in very early alpha, use at your own risk.

0.2.3

11 months ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago