simulor

🏃 miniature test runner

Usage no npm install needed!

<script type="module">
  import simulor from 'https://cdn.skypack.dev/simulor';
</script>

README

Simulor

discord guild version Build Status downloads

Install

npm i --save-dev simulor

yarn add -D simulor

Usage

It has own simple assertion library at src/assert.js test/index.mjs

import Simulor from 'simulor';
const tests = new Simulor;

// Adds a test that will run when .run() gets called
tests.add('equal meme', t => t.equal(2, 2));

// .pass() ignores function you provide and passes test every time
tests.pass('test2', t => t.equal(1, 2));

// .dont() doesn't run test at all
tests.dont('test3', t => t.equal(2, 2));

// Runs tests
// if you pass false process won't exit and .run will return promise
tests.run(exit = true);