test: clean up typecast through type assertions#1484
Open
arthurschreiber wants to merge 6 commits intomasterfrom
Open
test: clean up typecast through type assertions#1484arthurschreiber wants to merge 6 commits intomasterfrom
arthurschreiber wants to merge 6 commits intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1484 +/- ##
==========================================
- Coverage 80.48% 80.45% -0.03%
==========================================
Files 91 91
Lines 4657 4657
Branches 856 856
==========================================
- Hits 3748 3747 -1
- Misses 633 634 +1
Partials 276 276
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
aec4b5c to
1103c79
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This removes the
@types/chaipackage and instead places a copy of the type definitions totypes/chai.d.ts.I made a few changes to the type definitions for
chaiand opened a pull request over at DefinitelyTyped/DefinitelyTyped#60464. Unfortunately, the changes haven't been merged yet, and I didn't have time to fix up the PR.To clean up the tests in
tedious, I decided that it'll be easier to vendor the type definitions forchaifor the time being, and then re-open that pull request at some later time.One of the changes I made to the
chaidefinitions is to changeassert.instanceOfto perform a type assertion. This helps TypeScript's understanding of what types a variable can have after the call to the assertion method. A similar change was also done toassert.exists.