Skip to content

Commit 5843ab5

Browse files
authored
Further clarified comment
1 parent 0c5c78c commit 5843ab5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

integration_tests/stack_trace/__tests__/custom_matcher.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ describe('Custom matcher', () => {
3838
}).toThrow();
3939
});
4040

41-
// This test fails due to an unrelated/unexpected error
42-
// It will show a helpful stack trace though
4341
it('preserves error stack', () => {
4442
const foo = () => bar();
4543
const bar = () => baz();
4644
const baz = () => {
4745
throw Error('qux');
4846
};
4947

48+
// This expecation fails due to an error we throw (intentionally)
49+
// The stack trace should point to the line that throws the error though,
50+
// Not to the line that calls the matcher.
5051
expect(() => {
5152
foo();
5253
}).toCustomMatch('test');

0 commit comments

Comments
 (0)