-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Port hardhat-chai-matchers #5946
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
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
Switch the `./src/types.ts` file to a `./src/types.d.ts` file. This allows typescript to correctly pick up the Chai types being extended. There were some small built fixes as well (e.g. changing the type of a passed arg to be `bigint[]`. I added in the type declaration as an import from `./index.ts` and imported the `add-chai-matchers` bootstrap code.
v-next/hardhat-chai-matchers/src/internal/hook-handlers/network.ts
Outdated
Show resolved
Hide resolved
…hat-chai-matchers
v-next/hardhat-chai-matchers/src/internal/hook-handlers/network.ts
Outdated
Show resolved
Hide resolved
alcuadrado
left a comment
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.
I left some more comments, but feel free to merge after resolving them.
GOAL:
This PR ports the
hardhat-chai-matchersv2 code to v3.RELATED ISSUES (TODOs):
OVERVIEW:
The v2 code has been ported to v3 by preserving the core logic and structure while introducing minor adjustments.
The adjustments mostly relate to the plugin's initialization process. For a detailed overview, refer to the design doc.
NOTES:
AssertionError. This behavior has been retained rather than switching toHardhatErrorethershave been replaced with those fromhardhat-utils.E.G.: toBeHex -> numberToHexString