-
-
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
6e41bcd
feat: adds error when using it or test without proper arguments
brianlmacdonald b551940
fix: adds more descriptive error message
brianlmacdonald 1de43af
feat: adds tests for errors
brianlmacdonald f4a012e
fix: removes bad test
brianlmacdonald a84007f
feat: adds tests for circus and jasmine2
brianlmacdonald 85587bd
fix: small tweaks to test names
brianlmacdonald 325fe11
fix: adds circus test to flow ignore
brianlmacdonald 363e590
fix: variable names for circus it
brianlmacdonald bf07249
chore: updates changelog.
brianlmacdonald 918ad6d
fixes: lint error
brianlmacdonald d2a3668
updates: globals tests and snapshots
brianlmacdonald b489b37
fix: resets snapshot file
brianlmacdonald a873a75
fix: temp skips failing tests until further direction
brianlmacdonald 119130c
feat: adds tests for test alias
brianlmacdonald 1d6e12c
fix: renamed unimplemented test. Comments out rest snapshot for now.
brianlmacdonald 29a0f0a
fix: restores rest snapshot and removes abs path from snapshot stack
brianlmacdonald d8eac51
fix: cleans up stack using cleanUpStackTrace
brianlmacdonald e09303f
fix: modifies regex in utils
brianlmacdonald 5106800
fix: reverts utils regex
brianlmacdonald 84d9a9b
fix: reverts line deletion in utils.
brianlmacdonald 7815602
fix: replaces env in cleanup stack trace
brianlmacdonald 0728d30
fix: updates utils to current version
brianlmacdonald b10ad04
fix: updates master
brianlmacdonald 1ba971c
Merge remote-tracking branch 'upstream/master'
brianlmacdonald 19d8d88
feat: adds error when using it or test without proper arguments
brianlmacdonald af8efd7
fix: adds more descriptive error message
brianlmacdonald 30ccac2
feat: adds tests for errors
brianlmacdonald 1842a5d
fix: removes bad test
brianlmacdonald 17d3050
feat: adds tests for circus and jasmine2
brianlmacdonald 754bf38
fix: small tweaks to test names
brianlmacdonald 5464098
fix: adds circus test to flow ignore
brianlmacdonald 42ef481
fix: variable names for circus it
brianlmacdonald fdc0dc3
chore: updates changelog.
brianlmacdonald e986609
updates: globals tests and snapshots
brianlmacdonald a6ab7b0
fix: resets snapshot file
brianlmacdonald 5453e9f
fix: temp skips failing tests until further direction
brianlmacdonald 1520b94
feat: adds tests for test alias
brianlmacdonald 193cdf6
fix: renamed unimplemented test. Comments out rest snapshot for now.
brianlmacdonald b2ac1c5
fix: restores rest snapshot and removes abs path from snapshot stack
brianlmacdonald 5ad1768
fix: cleans up stack using cleanUpStackTrace
brianlmacdonald 0312138
fix: modifies regex in utils
brianlmacdonald ca714e7
fix: reverts utils regex
brianlmacdonald 1a4dd3a
fix: reverts line deletion in utils.
brianlmacdonald a1ea320
fix: replaces env in cleanup stack trace
brianlmacdonald ef31915
fix: addresses patch
brianlmacdonald 5e0aabd
fix: replaces overly long packages path for CI test
brianlmacdonald 30aa554
fix: adds new snapshot after packages fix
brianlmacdonald 735bbc2
fix: updates globals snapshot after packages fix
brianlmacdonald 9514c32
fix: finalizes globals snapshot
brianlmacdonald edc9231
fix: reverses bad snapshot commit
brianlmacdonald d5aa613
fix: adds missing cli snapshot
brianlmacdonald 0a560ed
fix: bad snap commit
brianlmacdonald 911c6e1
fix: format test name bad commit
brianlmacdonald 07a51fb
fix: adds back trailing newline
brianlmacdonald 281100c
Merge remote-tracking branch 'upstream/master'
brianlmacdonald ca02d0a
updates master
brianlmacdonald 6e351e7
feat: adds error when using it or test without proper arguments
brianlmacdonald 7eca76f
fix: adds more descriptive error message
brianlmacdonald f85f956
feat: adds tests for errors
brianlmacdonald e64357e
fix: removes bad test
brianlmacdonald f2359e0
feat: adds tests for circus and jasmine2
brianlmacdonald 4aa3101
fix: small tweaks to test names
brianlmacdonald 139973b
fix: adds circus test to flow ignore
brianlmacdonald c0c478e
fix: variable names for circus it
brianlmacdonald ba03582
chore: updates changelog.
brianlmacdonald 061dab3
updates: globals tests and snapshots
brianlmacdonald 7195e05
fix: resets snapshot file
brianlmacdonald e411607
fix: temp skips failing tests until further direction
brianlmacdonald 5163ee3
feat: adds tests for test alias
brianlmacdonald e0ff615
fix: renamed unimplemented test. Comments out rest snapshot for now.
brianlmacdonald 29a3d64
fix: restores rest snapshot and removes abs path from snapshot stack
brianlmacdonald 85f359e
fix: cleans up stack using cleanUpStackTrace
brianlmacdonald 426cb07
fix: modifies regex in utils
brianlmacdonald 895f57e
fix: reverts utils regex
brianlmacdonald e6f8d6a
fix: reverts line deletion in utils.
brianlmacdonald 4547c55
fix: replaces env in cleanup stack trace
brianlmacdonald 5c1d541
fix: resolves rebase conflict
brianlmacdonald dd36839
feat: adds tests for errors
brianlmacdonald 873671a
fix: removes bad test
brianlmacdonald b36f4fb
fix: rebase conflict resolved
brianlmacdonald 07154b3
fix: variable names for circus it
brianlmacdonald 2b664de
fix: temp skips failing tests until further direction
brianlmacdonald 17d2f77
feat: adds tests for test alias
brianlmacdonald b867548
fix: renamed unimplemented test. Comments out rest snapshot for now.
brianlmacdonald b27c0b5
fix: restores rest snapshot and removes abs path from snapshot stack
brianlmacdonald 58e973b
fix: cleans up stack using cleanUpStackTrace
brianlmacdonald f1df10b
fix: modifies regex in utils
brianlmacdonald 7648643
fix: reverts utils regex
brianlmacdonald c612bca
fix: reverts line deletion in utils.
brianlmacdonald feaaf58
fix: replaces env in cleanup stack trace
brianlmacdonald 7378e67
fix: addresses patch
brianlmacdonald 6e2d789
fix: replaces overly long packages path for CI test
brianlmacdonald bf4e287
fix: adds new snapshot after packages fix
brianlmacdonald ba0c286
fix: updates globals snapshot after packages fix
brianlmacdonald 8e746b4
fix: reverses bad snapshot commit
brianlmacdonald f92e725
fix: adds missing cli snapshot
brianlmacdonald 7ab85b1
fix: format test name bad commit
brianlmacdonald c1753b3
fix: adds back trailing newline
brianlmacdonald b5985e1
fix: removes redundant BUILD path. updates snapshots
brianlmacdonald e03c1a7
fix: resolves remote changes
brianlmacdonald 06875a8
fix: deletes empty file, updates changelog
brianlmacdonald 661496b
Merge branch 'master' into feat/iterrorthrowing
brianlmacdonald f3f1213
fix: handle flow ignores in circus tests
thymikee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: adds circus test to flow ignore
- Loading branch information
commit 5464098790119b21f65d4632a384b782285caa76
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/jest-circus/src/__tests__/circus_it_test_error.test.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Wait, this is not supposed to be here
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.
@thymikee it's so the jest-circus tests can check the error for a missing or incorrect argument. If Flow is on for this file it won't run the test. I'm happy to go about this in another manner, if you'd rather.
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.
Just remove the
@flowpragma from circus test. Let's keep this config as clean as possibleThere 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.
@thymikee
The lint config throws an error during yarn test. Can I remove this line? Or add the test file to the lint ignore? Or an exception to the rule?
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.
Nope. The problem with this and previous approach is that it's easy to forget we have this "exception", which may lead to falsy feel of confidence about our codebase. I've pushed a commit with a proper, in my opinion, change for this case 🙂
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.
Awesome! $FlowFixMe: is something I'll have to remember. Thanks!