-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Accept Typed object in matcher #4715
Accept Typed object in matcher #4715
Conversation
🦋 Changeset detectedLatest commit: 72bf9f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This reverts commit dafc954.
Thanks @RenanSouza2, and sorry for taking so long to get this merged. I found a problem with one of our custom linting rules when I reviewed it (#4786), so we wanted to get that fixed first. |
Ah, also: I removed one of the tests, because I think it was just encoding a limitation (that 2 and typed 2 cannot be compared). Since that's more of a lack of a feature than a decision, I think it shouldn't be represented in a test. But please let me know if you disagree! |
No problems about that :)
That test was to assure it was not rejecting all other Typed objects. At first I used the ethers dereference function dereference directly and that function throws an error when you pass a different type other than the one stored at the typed object that test had a use but I don't see that much of a deal removing it |
Hmm, I'm not sure I understand. This was the test: it("should accept other typed objects", async function () {
expect(() => {
expect(2).to.equal(ethers.Typed.uint256(2));
}).to.throw("expected 2 to equal");
}); But I would actually expect that assertion to pass, not to throw. I mean: asserting that |
Resolves #4716
This PR expands the reccently added feature of accepting multiple forms of address in the macthers
It now accpets objects created by ethers.Typed.address()