Skip to content

Lesson 7- Explain Unit test for constructor #2725

Discussion options

You must be logged in to vote

Hey @VeerniVishwanath you are right, response returns an address while mockV3Aggregator is an object. However, mockV3Aggregator.address which is used in the assert is not an object, it is also an address.
In your code above, I'm seeing you are logging both response and mockV3Aggregator to the terminal. To test my theory, try logging out mockV3Aggregator.address instead of just mockV3Aggregator and you'll finally see that the two are equal.
Use console.log(mockV3Aggregator.address);

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@VeerniVishwanath
Comment options

@othaime-en
Comment options

Answer selected by VeerniVishwanath
Comment options

You must be logged in to vote
1 reply
@VeerniVishwanath
Comment options

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants