Add support for mocha-json

This commit is contained in:
Michal Dorner 2021-02-23 22:39:35 +01:00
parent f285c4c6d7
commit 9b675bd55f
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
21 changed files with 1588 additions and 59 deletions

View file

@ -0,0 +1,24 @@
const assert = require('assert').strict;
const lib = require('../lib/main')
describe('Test 1', () => {
it('Passing test', () => {
assert.equal(true, true)
});
describe('Test 1.1', () => {
it('Failing test', () => {
assert.equal(false, true)
});
it('Exception in target unit', () => {
lib.throwError();
});
});
});
describe('Test 2', () => {
it('Exception in test', () => {
throw new Error('Some error');
});
});

View file

@ -0,0 +1,8 @@
it('Timeout test', async function(done) {
this.timeout(1);
setTimeout(done, 1000);
});
it.skip('Skipped test', () => {
// do nothing
});