Reputation: 115
_assertEqual("/" + "887.90" + "/", 887)
The above code is not working. We are using Sahi pro automation tool, a JavaScript-based tool.
Kindly suggest how to handle the assertion.
Upvotes: 0
Views: 67
Reputation: 2615
The API _assertEqual works like this:
_assertEqual($expected, $actual[, $message])
Now I am not sure if you are using correct values for expected and actual or not, but try this:
_assertEqual("/887.90/", "887");
Just note that this will give you false. This is because you are saying that 887 should match a pattern like 887.90, which comes out as false. I think what you may be looking for is:
_assertEqual("887.90", "/887/");
Upvotes: 2