mocha-test-cases
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

mocha-test-cases

Build Status

This package provides support for test cases in mocha. Right now there is Typescript support for up to 5 arguments, after which its just an any[].

import { test } from 'mocha-test-cases';
import { suite } from 'mocha';
import { assert } from 'chai';
 
suite('Test', () => {
    // With testcases
    test
        .case(1, 2, 3)
        .case(4, 5, 9)
        .run('a + b = c', (a, b, c) => {
            assert.equal(+ b, c);
        });
 
    // Without testcases
    test('a basic test', () => {
        assert.equal(true, true);
    });
});
 

Readme

Keywords

Package Sidebar

Install

npm i mocha-test-cases

Weekly Downloads

1

Version

1.0.0

License

GPL-3.0

Unpacked Size

5.07 kB

Total Files

5

Last publish

Collaborators

  • maxjoehnk