-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change simplifies the cucumber parsers and brings them down to 1 parser. The docs are also updated with usage examples. Closes #71 BREAKING CHANGE: cucumberMulti parser can't be used anymore To migrate change `cucumberMulti` to `cucumber`
- Loading branch information
1 parent
92728d3
commit 1a07322
Showing
8 changed files
with
153 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
export default { | ||
name: 'cucumber', | ||
|
||
name: 'cucumberMulti', | ||
parse (output) { | ||
let match = null | ||
let failedSpecs = [] | ||
let FAILED_LINES = /(.*?):\d+ # Scenario:.*/g | ||
while (match = FAILED_LINES.exec(output)) { // eslint-disable-line no-cond-assign | ||
failedSpecs.push(match[1]) | ||
} | ||
|
||
return failedSpecs | ||
let testsOutput = output.split('------------------------------------') | ||
let RESULT_FAIL = 'Failures:' | ||
let SPECFILE_REG = /Specs:\s(.*\.feature)/g | ||
testsOutput.forEach(function (test) { | ||
// only check specs when RESULT_FAIL, ` Specs: ` is always printed when at least multiple features on 1 instance | ||
// are run with `shardTestFiles: true` | ||
if (test.indexOf(RESULT_FAIL) > -1) { // eslint-disable-line no-cond-assign | ||
while (match = SPECFILE_REG.exec(test)) { // eslint-disable-line no-cond-assign | ||
failedSpecs.push(match[1]) | ||
} | ||
} | ||
}) | ||
// Remove double values | ||
return [...new Set(failedSpecs)] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.