@supertape/engine-loader

supertape stub operator

Usage no npm install needed!

<script type="module">
  import supertapeEngineLoader from 'https://cdn.skypack.dev/@supertape/engine-loader';
</script>

README

@supertape/engine-loader NPM version Build Status Coverage Status

Load operators into supertape.

Install

npm i @supertape/engine-loader -D

Examples

import {loadOperators} from '@supertape/engine-loader';
import {
    extend,
    stub,
} from 'supertape';

const operators = await loadOperators([
    'stub',
]);

const test = extend(operators);

test('with operators', (t) => {
    const fn = stub();
    
    fn('hello');
    
    t.calledWith(fn, ['hello']);
    t.end();
});

License

MIT