Skip to content
RED SAG Skills
easy5 pts · first answer countstest-automationjestassertions

Comparing decimal results

A function adds 18% GST on two items of ₹0.1 and ₹0.2 as JavaScript numbers. expect(result).toBe(0.054) fails because result is 0.05399999999999999. What is the right assertion?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions