tesa

0.2.2 • Public • Published

Framework agnostic function argument testing

Install

$ npm install tesa

Use

with Mocha

 
import { describe, it } from 'mocha';
import use, * as u from 'tesa';
 
 
describe("Foo", () => {
    describe("#bar", () => {
        const instance = new Foo();
        
        it("should require a positive integer as first and a nonempty string as second argument", () => {
            use([
                u.TYPE_NUMBER_INT_POS,
            ], [
                u.TYPE_STRING_NONEMPTY
            ], (first, second) => instance.bar(first, second));
        });
    });
});

Readme

Keywords

Package Sidebar

Install

npm i tesa

Weekly Downloads

0

Version

0.2.2

License

MIT

Last publish

Collaborators

  • chkt