mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Add support for mocha-json
This commit is contained in:
parent
f285c4c6d7
commit
9b675bd55f
21 changed files with 1588 additions and 59 deletions
24
reports/mocha/test/main.test.js
Normal file
24
reports/mocha/test/main.test.js
Normal 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');
|
||||
});
|
||||
});
|
||||
8
reports/mocha/test/second.test.js
Normal file
8
reports/mocha/test/second.test.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
it('Timeout test', async function(done) {
|
||||
this.timeout(1);
|
||||
setTimeout(done, 1000);
|
||||
});
|
||||
|
||||
it.skip('Skipped test', () => {
|
||||
// do nothing
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue