-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add error throwing to 'it'/'test' for incorrect arguments. #5558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6e41bcd
b551940
1de43af
f4a012e
a84007f
85587bd
325fe11
363e590
bf07249
918ad6d
d2a3668
b489b37
a873a75
119130c
1d6e12c
29a0f0a
d8eac51
e09303f
5106800
84d9a9b
7815602
0728d30
b10ad04
1ba971c
19d8d88
af8efd7
30ccac2
1842a5d
17d3050
754bf38
5464098
42ef481
fdc0dc3
e986609
a6ab7b0
5453e9f
1520b94
193cdf6
b2ac1c5
5ad1768
0312138
ca714e7
1a4dd3a
a1ea320
ef31915
5e0aabd
30aa554
735bbc2
9514c32
edc9231
d5aa613
0a560ed
911c6e1
07a51fb
281100c
ca02d0a
6e351e7
7eca76f
f85f956
e64357e
f2359e0
4aa3101
139973b
c0c478e
ba03582
061dab3
7195e05
e411607
5163ee3
e0ff615
29a3d64
85f359e
426cb07
895f57e
e6f8d6a
4547c55
5c1d541
dd36839
873671a
b36f4fb
07154b3
2b664de
17d2f77
b867548
b27c0b5
58e973b
f1df10b
7648643
c612bca
feaaf58
7378e67
6e2d789
bf4e287
ba0c286
8e746b4
f92e725
7ab85b1
c1753b3
b5985e1
e03c1a7
06875a8
661496b
f3f1213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,8 @@ test('cannot test with no implementation', () => { | |
| expect(status).toBe(1); | ||
|
|
||
| const {summary, rest} = extractSummary(stderr); | ||
| // expect(rest).toMatchSnapshot(); | ||
| const restWithoutStack = rest.slice(0, 343); | ||
|
||
| expect(restWithoutStack).toMatchSnapshot(); | ||
| expect(summary).toMatchSnapshot(); | ||
| }); | ||
|
|
||
|
|
@@ -201,7 +202,8 @@ test('cannot test with no implementation with expand arg', () => { | |
| expect(status).toBe(1); | ||
|
|
||
| const {summary, rest} = extractSummary(stderr); | ||
| // expect(rest).toMatchSnapshot(); | ||
| const restWithoutStack = rest.slice(0, 343); | ||
| expect(restWithoutStack).toMatchSnapshot(); | ||
| expect(summary).toMatchSnapshot(); | ||
| }); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, any way we can disable code frame for this one, @SimenB?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It points to the
itin real code, not sure why it shows thethrowhere..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the frame is probably unable to find
__tests__/only-constructs.test.jsfor whatever reason - I'd debug thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I’ll look in it. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was pulling in the wrong frame because In jest-message-util
Wouldn't catch if the the top frame was from jest packages, so I added a condition:
that way it ignores the jest code as the topframe.