Skip to content

Commit

Permalink
feat: Update standard parser to accept 'suite'
Browse files Browse the repository at this point in the history
Standard parser is updated by adding "Suite" in context.
Therefore the parser will be able to handle failures which come from
Suite context such as this one.

Error: Failed expectation
    at Suite.<anonymous> (/var/www/e2e/P0-keeping-the-data.e2e-spec.ts:59:51)
    at step (/var/www/e2e/P0-keeping-the-data.e2e-spec.ts:32:23)
    at Object.next (/var/www/e2e/P0-keeping-the-data.e2e-spec.ts:13:53)
    at fulfilled (/var/www/e2e/P0-keeping-the-data.e2e-spec.ts:4:58)
    at process._tickCallback (internal/process/next_tick.js:103:7)
  • Loading branch information
Vladimir Dimikj committed Apr 25, 2018
1 parent a5864a1 commit b9f0ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsers/standard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// note: we use String.raw here to avoid the need to double escape '\' characters
// e.g. using a traditional string we would need '\\[object Object\\]'
// whereas raw allows us the terser `\[` because it doesn't interpret '\' as an escape
const context = String.raw`\[object Object\]|Object|Context|UserContext`
const context = String.raw`\[object Object\]|Object|Context|UserContext|Suite`
const source = String.raw`<anonymous>|it|beforeEach|afterEach|before|after`
const filepath = String.raw`(([A-Za-z]:\\)?.*?):.*`
const regexString = String.raw`at (?:${context})\.(?:${source}) \(${filepath}\)`
Expand Down

0 comments on commit b9f0ce9

Please sign in to comment.