jestro

Library providing features for testing

Usage no npm install needed!

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

README

Jestro

Jestro is a node.js Javascript library that provides tooling for testing code.

Features

  • Declare unit tests using the UnitTest class

Usage

Jast is very simple to use for example:

const {UnitTest, Module, run, expect} = require('jestro');

Module('Testing mathimatical operations', () => {
    new UnitTest()
        .name('add')
        .description('tests the addition maths operation')
        .test(() => {
            expect.number(2 + 3);
            expect.equal(6 + 5, 11);
            expect.not.equal(8 + 1, 10);
        });

    new UnitTest()
        .name('sub')
        .description('tests the subtraction maths operation')
        .test(() => {
            expect.number(2 - 3);
            expect.equal(10 - 4, 6);
            expect.not.equal(12 - 9, 98);
        });
});

More examples are located here.

Install

To install Jestro use the npm install command as shown below: npm install jestro

Documentation

Documentation was generated by documentation.js and is located here.

License

MIT