Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxjoehnk/test-cases
Generate test cases for most javascript test runners
https://github.com/maxjoehnk/test-cases
mocha tdd unit-tests
Last synced: 19 days ago
JSON representation
Generate test cases for most javascript test runners
- Host: GitHub
- URL: https://github.com/maxjoehnk/test-cases
- Owner: maxjoehnk
- Created: 2019-01-18T15:24:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:23:39.000Z (11 months ago)
- Last Synced: 2024-10-09T16:20:57.986Z (about 1 month ago)
- Topics: mocha, tdd, unit-tests
- Language: TypeScript
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# test-cases
[![Build Status](https://travis-ci.com/maxjoehnk/test-cases.svg?branch=master)](https://travis-ci.com/maxjoehnk/test-cases)
This package provides support for test cases in most test runners.
Just call setup with the function you use to declare your test (ie `it` for jasmine or mochas bdd interface, `test` for mochas tdd interface,...).
Right now there is Typescript support for up to 5 arguments, after which its just an `any[]`.```typescript
import { setup } from 'test-cases';
import * as mocha from 'mocha';
import { assert } from 'chai';
const test = setup(mocha.test);suite('Test', () => {
// With testcases
test
.case(1, 2, 3)
.case(4, 5, 9)
.run('a + b = c', (a, b, c) => {
assert.equal(a + b, c);
});// Without testcases
test('a basic test', () => {
assert.equal(true, true);
});
});```