Skip to content
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

Use hardhat-test-utils' functions #5496

Merged
merged 8 commits into from
Jul 9, 2024
Merged

Use hardhat-test-utils' functions #5496

merged 8 commits into from
Jul 9, 2024

Conversation

alcuadrado
Copy link
Member

This PR adds new eslint rules to forbid the error-related assertions that node:assert/strict has, and forces us to use our own instead.

It also fixies all the new linter errors, so it's a large and repetitive PR.

Copy link

vercel bot commented Jul 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 9:37pm

Copy link

changeset-bot bot commented Jul 8, 2024

⚠️ No Changeset found

Latest commit: 250cd29

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alcuadrado alcuadrado added the v-next A Hardhat v3 development task label Jul 8, 2024
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Jul 8, 2024
@alcuadrado alcuadrado requested a review from schaable July 8, 2024 19:45
export async function assertRejectsWithHardhatError<
ErrorDescriptorT extends ErrorDescriptor,
>(
f: (() => Promise<any>) | Promise<any>,
op: (() => Promise<any>) | Promise<any>,
descritor: ErrorDescriptorT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, we missed this in the previous PR. There's a typo here, and it's also present in the other function.

@alcuadrado alcuadrado force-pushed the use-error-assertions branch from 8bdd711 to 250cd29 Compare July 9, 2024 21:36
@alcuadrado alcuadrado merged commit 4c11d36 into v-next Jul 9, 2024
50 checks passed
@alcuadrado alcuadrado deleted the use-error-assertions branch July 9, 2024 21:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants