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));
        });
    });
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.2
    0
  • 0.2.1
    0
  • 0.2.0
    1
  • 0.1.0
    0

Package Sidebar

Install

npm i tesa

Weekly Downloads

1

Version

0.2.2

License

MIT

Last publish

Collaborators

  • chkt