I want to use two values to get compared so that if either is true then my test should pass.Using the below code is comapring only 1st condition and failing the test.
if (typeof lng !== 'undefined') {
data.lng.should.equal(lng) || data.cityLng.should.equal(lng);
}
How should I do this?
Try this:
if (typeof lng !== 'undefined') {
lng.should.be.equalOneOf(data.lng, data.cityLng);
See documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With