I am testing an Express Node app with Mocha. I would like to have the following test (comparing two empty arrays):
assert.equal [], []
to p
If you're comparing objects ({} or []) you have to use assert.deepEqual() because if you do assert.equal([], []) you're just comparing the references: {} === {} (or [] === []) will be always false.
assert.deepEqual()
assert.equal([], [])
{} === {}
[] === []
http://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message