Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Aug 20, 2024
1 parent 3c6e05d commit 721f602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/allure-js-commons/src/sdk/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ export const getStatusFromError = (error: Error): Status => {
* Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`
* `jest` throws `JestAssertionError` instance
* `jasmine` throws `ExpectationFailed` instance
* `vitest` throws `Error` for extended assertions, so we look into stack
*/
case /assert/gi.test(error.constructor.name):
case /expectation/gi.test(error.constructor.name):
case /assert/gi.test(error.name):
case /assert/gi.test(error.message):
case "actual" in error && "expected" in error:
case error.stack && /@vitest\/expect/gi.test(error.stack):
return Status.FAILED;
default:
return Status.BROKEN;
Expand Down

0 comments on commit 721f602

Please sign in to comment.