0.4.0-pre.2 • Published 7 years ago
@charmander/test v0.4.0-pre.2
Organizes and runs tests.
Usage
'use strict';
const assert = require('assert');
const test = require('@charmander/test')(module);
test('synchronous test, no return value', () => {
assert(1 < 2);
});
test('asynchronous test, promise return value', async () => {
const n = await Promise.resolve(2);
assert(1 < n);
});or
const describe = require('@charmander/test/describe')(module);
describe('thing', it => {
it('behaves', () => {
assert(1 < 2);
});
});Running node path/to/test-module.js will run tests in that module. Test modules export an array of test objects, which have a name property and a .run() method. .run() returns a promise that rejects with a test error or resolves with undefined.
0.4.0-pre.2
7 years ago
0.4.0-pre.1
7 years ago
0.4.0-pre
7 years ago
0.3.0
7 years ago
0.2.0
7 years ago
0.1.0
8 years ago