mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Add jest-junit fixture project
This commit is contained in:
parent
83a6323aa9
commit
f861278768
7 changed files with 4835 additions and 1 deletions
23
reports/jest/__tests__/main.test.js
Normal file
23
reports/jest/__tests__/main.test.js
Normal 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');
|
||||
});
|
||||
});
|
||||
7
reports/jest/__tests__/second.test.js
Normal file
7
reports/jest/__tests__/second.test.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
test('Timeout test', async () => {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
}, 1);
|
||||
|
||||
test.skip('Skipped test', () => {
|
||||
// do nothing
|
||||
});
|
||||
5
reports/jest/lib/main.js
Normal file
5
reports/jest/lib/main.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function throwError() {
|
||||
throw new Error('Some error')
|
||||
}
|
||||
|
||||
exports.throwError = throwError
|
||||
4717
reports/jest/package-lock.json
generated
Normal file
4717
reports/jest/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
reports/jest/package.json
Normal file
21
reports/jest/package.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "jest-fixture",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "Generates test fixtures for test-check action",
|
||||
"scripts": {
|
||||
"test": "jest --ci --reporters=default --reporters=jest-junit"
|
||||
},
|
||||
"author": "Michal Dorner <dorner.michal@gmail.com>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"jest": "^26.5.3",
|
||||
"jest-junit": "^12.0.0"
|
||||
},
|
||||
"jest-junit": {
|
||||
"suiteName": "jest tests",
|
||||
"outputDirectory": "../../__tests__/fixtures",
|
||||
"outputName": "jest-junit.xml",
|
||||
"uniqueOutputName": "false"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue