Skip to content

Commit

Permalink
Fix failed test reporter for SIEM Cypress use (#57240) (#57746)
Browse files Browse the repository at this point in the history
* [@kbn/test] build with source-maps

* [@kbn/test] the jUnit Reporter being used for SIEM Cypress tests sometimes doesn't include testcases in XML

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Spencer and elasticmachine authored Feb 15, 2020
1 parent 246d7da commit 3e3afcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"private": true,
"scripts": {
"build": "babel src --out-dir target --delete-dir-on-start --extensions .ts,.js,.tsx --ignore *.test.js,**/__tests__/**",
"build": "babel src --out-dir target --delete-dir-on-start --extensions .ts,.js,.tsx --ignore *.test.js,**/__tests__/** --source-maps=inline",
"kbn:bootstrap": "yarn build",
"kbn:watch": "yarn build --watch"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-test/src/failed_tests_reporter/test_report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface TestSuite {
/* number of skipped tests as a string */
skipped: string;
};
testcase: TestCase[];
testcase?: TestCase[];
}

export interface TestCase {
Expand Down Expand Up @@ -89,7 +89,7 @@ export function* makeTestCaseIter(report: TestReport) {
const testSuites = 'testsuites' in report ? report.testsuites.testsuite : [report.testsuite];

for (const testSuite of testSuites) {
for (const testCase of testSuite.testcase) {
for (const testCase of testSuite.testcase || []) {
yield testCase;
}
}
Expand Down

0 comments on commit 3e3afcc

Please sign in to comment.