@slimio/unit-testing

SlimIO Unit testing framework

Usage no npm install needed!

<script type="module">
  import slimioUnitTesting from 'https://cdn.skypack.dev/@slimio/unit-testing';
</script>

README

unit-testing

version Maintenance MIT

Simple, secure and blazing fast Unit testing framework with no assert lib.

Requirements

Goals

  • Avoid fancy and useless features.
  • No bundled assertion framework (chose what you want).
  • The best startup across packages.
  • Synchronous and Asynchronous Unit-testing (with Worker threads API).
  • Keep it simple and secure as hell.

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @slimio/unit-testing
# or
$ yarn add @slimio/unit-testing

Usage example

import test from "@slimio/unit-testing";
import { strict as assert } from "assert";

test.before = function before() {
    console.log("before");
};

test("plan 1 must be ok", (curr) => {
    curr.plan(1);
    curr.pass();
});

test("true must be false", () => {
    assert.equal(true, false, "expect true to be strict equal to false");
});

API

TBC

Dependencies

Name Refactoring Security Risk Usage
@slimio/is Minor Low Type checker
@slimio/pretty-stack Minor High TBC
kleur Minor Low TTY color

License

MIT