test: clean up typecast through type assertions #1484
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/chai
package and instead places a copy of the type definitions totypes/chai.d.ts
.I made a few changes to the type definitions for
chai
and 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 forchai
for the time being, and then re-open that pull request at some later time.One of the changes I made to the
chai
definitions is to changeassert.instanceOf
to 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
.