Add jest-junit fixture project

This commit is contained in:
Michal Dorner 2020-10-18 21:08:40 +02:00
parent 83a6323aa9
commit f861278768
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
7 changed files with 4835 additions and 1 deletions

View file

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

View file

@ -0,0 +1,7 @@
test('Timeout test', async () => {
await new Promise(resolve => setTimeout(resolve, 1000));
}, 1);
test.skip('Skipped test', () => {
// do nothing
});