iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
962 stars 576 forks source link

Remove `@types/jest`, and use Jest's own type annotations instead #5113

Closed andiflabs closed 2 weeks ago

andiflabs commented 3 weeks ago

Summary

This removes @types/jest in favor of @jest/types and friends. This allows using jest and expect to their full potential, and allow using new features like this: https://github.com/iron-fish/ironfish/blob/d8dffe54b17a3555efb013230726c3bb19eef784/ironfish/src/testUtilities/matchers/transaction.ts.

@types/jest was probably added at a time when Jest did not have any type annotations, but now that jest does have the annotations, it makes sense (in my opinion) to switch to using those. Some drawbacks:

In addition to removing @types/jest, this PR also:

Testing Plan

Documentation

N/A

Breaking Change

N/A