3h-test

A simple test lib.

Usage no npm install needed!

<script type="module">
  import hTest from 'https://cdn.skypack.dev/3h-test';
</script>

README

3h-test

A simple test lib.

Links

Example

const T = require('3h-test');

T.test({ // default context options
    timeout: 1000,
}, { // test cases

    strictEqual(context) { // test case 0
        context.assertStrictEqual(1 + 2, 3);
    },

    promise(context) { // test case 1
        context.expectResolved(
            somePromise,
            'label',
            data => {
                // extra check on the data...
            }
        );
    },

});