Testing with Assert (fails) vs Testing with Expect (passes) #1493
dimitar-dermendzhiev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following function in my test file
and in my describe function I have the total supply set like this
in my it function I have the following assert statement which fails
if I use expect instead of assert the test passes
I checked the type of both objects and it says they are both of type object BigNumber and they both have the same value which makes me confused why the assert fails and the expect passes.
The assert statement passes if do it like this
But then it comes my question. Why I have to use the toString() method when using assert and not using it when doing expect?
Beta Was this translation helpful? Give feedback.
All reactions