nodeunit icon indicating copy to clipboard operation
nodeunit copied to clipboard

when `actual` is undefined, AssertionError == Assertion Message.

Open user24 opened this issue 12 years ago • 2 comments

example:

module.exports.myTest = function (test) {
    test.expect(1);

    test.equal(undefined, 2, "some message")

    test.done();
}

/*

$ nodeunit test.js 

test.js
✖ myTest

Assertion Message: some message
AssertionError: some message // should say undefined == 2

*/

user24 avatar Sep 03 '13 07:09 user24

also happens when actual == 0

user24 avatar Sep 03 '13 07:09 user24

@caolan any workaround for this issue, apart from including the value of actual in the message?

dnwe avatar Jul 08 '14 10:07 dnwe