@klenty/gunner

Zero magic, fast test-runner and assertion framework. No magic globals.

Usage no npm install needed!

<script type="module">
  import klentyGunner from 'https://cdn.skypack.dev/@klenty/gunner';
</script>

README

Gunner

Django Unchained

Tiny, but fully loaded.

Gunner is a zero magic, fast test-runner and assertion framework. There are no magic globals or CLI specific interface.

Requirements & Usage

Gunner uses very modern JavaScript, and hence requires node 10+ ❗️⚠️ currently.

Create a new Gunner instance and simply write your tests. The assertion methods are passed in as the callback as an expect object to the test function.

const { Gunner, expect } = require('@klenty/gunner');
// Create new instance
const gunner = new Gunner();

// Define tests
gunner.test('arrays are equal', () => {
    return expect([1, 2,]).deepEqual([1 ,2]);
});

// Starts the runner
gunner.run();

Documentation

  • Class:

    • Gunner.constructor

  • Methods:

    • Gunner#test

    • Gunner#before

    • Gunner#after

    • Gunner#run

  • Constants:

    • [Gunner.Start]

    • [Gunner.End]

  • State and Advanced Usage

Credits

Gunner was built by Muthu Kumar (@MKRhere) at Klenty, a sales automation startup.