Skip to content

Commit 182555a

Browse files
committed
fix: tests
1 parent 12b5288 commit 182555a

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

e2e/__tests__/__snapshots__/failures.test.ts.snap

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,19 @@ FAIL __tests__/duringTests.test.js
188188
189189
● Object with stack prop thrown during test
190190
191-
42
191+
thrown: Object {
192+
"stack": 42,
193+
}
192194
195+
30 | });
196+
31 |
197+
> 32 | test('Object with stack prop thrown during test', () => {
198+
| ^
199+
33 | // eslint-disable-next-line no-throw-literal
200+
34 | throw {stack: 42};
201+
35 | });
193202
203+
at Object.test (__tests__/duringTests.test.js:32:1)
194204
195205
● Error during test
196206

packages/jest-jasmine2/src/expectationResultFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function stackFormatter(
4343
}
4444

4545
if (options.error) {
46-
if (options.error.stack) {
46+
if ( typeof options.error.stack === 'string') {
4747
return options.error.stack;
4848
}
4949

0 commit comments

Comments
 (0)