Files
jest/e2e/__tests__/__snapshots__/customReporters.test.ts.snap

170 lines
3.4 KiB
Plaintext

// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Custom Reporters Integration IncompleteReporter for flexibility 1`] = `
"onRunComplete is called
Passed Tests: 1
Failed Tests: 0
Total Tests: 1"
`;
exports[`Custom Reporters Integration TestReporter with all tests failing 1`] = `
Object {
"onRunComplete": Object {
"called": true,
"numFailedTests": 1,
"numPassedTests": 0,
"numTotalTests": 1,
},
"onRunStart": Object {
"called": true,
"options": "object",
},
"onTestResult": Object {
"called": true,
"times": 1,
},
"onTestStart": Object {
"called": true,
"path": false,
},
"reporterContext": Object {
"firstRun": true,
"previousSuccess": true,
},
"reporterOptions": Object {
"christoph": "pojer",
"dmitrii": "abramov",
"hello": "world",
},
}
`;
exports[`Custom Reporters Integration TestReporter with all tests passing 1`] = `
Object {
"onRunComplete": Object {
"called": true,
"numFailedTests": 0,
"numPassedTests": 1,
"numTotalTests": 1,
},
"onRunStart": Object {
"called": true,
"options": "object",
},
"onTestResult": Object {
"called": true,
"times": 1,
},
"onTestStart": Object {
"called": true,
"path": false,
},
"reporterContext": Object {
"firstRun": true,
"previousSuccess": true,
},
"reporterOptions": Object {
"christoph": "pojer",
"dmitrii": "abramov",
"hello": "world",
},
}
`;
exports[`Custom Reporters Integration default reporters enabled 1`] = `
"PASS __tests__/add.test.js
Custom Reporters
✓ adds ok"
`;
exports[`Custom Reporters Integration default reporters enabled 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites matching add.test.js."
`;
exports[`Custom Reporters Integration default reporters enabled 3`] = `
Object {
"onRunComplete": Object {
"called": true,
"numFailedTests": 0,
"numPassedTests": 1,
"numTotalTests": 1,
},
"onRunStart": Object {
"called": true,
"options": "object",
},
"onTestResult": Object {
"called": true,
"times": 1,
},
"onTestStart": Object {
"called": true,
"path": false,
},
"reporterContext": Object {
"firstRun": true,
"previousSuccess": true,
},
"reporterOptions": Object {},
}
`;
exports[`Custom Reporters Integration invalid format for adding reporters 1`] = `
"● Reporter Validation Error:
Unexpected value for Path at index 0 of reporter at index 0
Expected:
string
Got:
number
Reporter configuration:
[
3243242
]
Configuration Documentation:
https://jestjs.io/docs/configuration
"
`;
exports[`Custom Reporters Integration reporters can be default exports 1`] = `
"run start
test start
test complete
run complete"
`;
exports[`Custom Reporters Integration valid array format for adding reporters 1`] = `
"{
"onRunComplete": {
"called": true,
"numPassedTests": 1,
"numFailedTests": 0,
"numTotalTests": 1
},
"onRunStart": {
"called": true,
"options": "object"
},
"onTestResult": {
"times": 1,
"called": true
},
"onTestStart": {
"called": true,
"path": false
},
"reporterContext": {
"firstRun": true,
"previousSuccess": true
},
"reporterOptions": {
"Aaron Abramov": "Awesome"
}
}"
`;