Closed vipulgupta2048 closed 3 years ago
This could be an ideal solution - t.ok(inputValue >= outputValue, Values are correct.. Test passed
)
I use
t.ok(counter >= 5, `expected ${counter} >= 5`)
I put the value in the message because t.ok()
just shows truthy / falsey.
Back to tap? This is the repo for tape.
My bad,
I am bit new to this process as I am migrating some tests back to Tap. I couldn't help but notice there aren't specific assertions for the following to compare numbers. How can I write a similar test for them in Tap. I thought of using
t.ok
where I can formulate the expression into truthy value for my test but that didn't work out well. I feel I can add some more examples regarding comparisons other than just equal values.Reference