groupon / assertive

Assertive is a terse yet expressive assertion library
BSD 3-Clause "New" or "Revised" License
21 stars 11 forks source link

Support symbol in `assert.equal` error messages #13

Closed jkrems closed 9 years ago

jkrems commented 9 years ago

Currently the message is "Expected: undefined, Actual: undefined" which is not very helpful. The right thing would be to call x.toString() if x is a symbol. This would print "Expected: Symbol(Some description), Actual: Symbol(Other description)".

johan commented 9 years ago

For the test suite, what args do you have to spawn a node with to get ES6 capabilities like Symbol?

jkrems commented 9 years ago

I run io.js - no args required.

EDIT: But I think --harmony should give you Symbol support in recent node 0.11 versions as well.

johan commented 9 years ago

I guess until things mature or I get a PR, this feature might have to go in without tests.