chkt / tesa

Framework agnostic function argument testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Framework agnostic function argument testing


Languages

Language:JavaScript 100.0%