tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

looseEquals() from v4 failed in v5 #600

Closed m-holstein closed 11 months ago

m-holstein commented 11 months ago

My test from v4 with looseEquals failed in v5 and I have no idea why. fixture req, (err, responses) -> t.looseEquals (responses.map (r) -> r.recipient), (_.reverse req.data.recipients), 'info for every recipient' t.end()

Data is: data: recipients: [ 'foo@example.com' 'bar@example.com' 'baz@example.com' ]

Is the behavior of looseEquals in v5 different?

ljharb commented 11 months ago

Yes, in v5 looseEqual is ==, in v4 it's .deepLooseEqual. Change all of your looseEquals to deepLooseEqual and it should work in both majors.