You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot convert object to primitive value
at jsonStringify (mocha/lib/utils.js:504:7)
at Object.exports.stringify (mocha/lib/utils.js:431:14)
at mocha/lib/reporters/base.js:203:37
at Array.forEach (native)
at Function.exports.list (mocha/lib/reporters/base.js:163:12)
at Spec.Base.epilogue (mocha/lib/reporters/base.js:328:10)
at Runner.emit (events.js:129:20)
at mocha/lib/runner.js:791:12
at mocha/lib/runner.js:644:9
at next (mocha/lib/runner.js:284:14)
The text was updated successfully, but these errors were encountered:
joshlory
pushed a commit
to joshlory/mocha
that referenced
this issue
Feb 16, 2016
…length
Root cause is that some JS objects cannot be coerced to a Number:
Number({toString: 0});
TypeError: can't convert ({toString:0}) to number
Number({a: 0});
NaN
When comparing objects with certain
length
properties, the reporter throws when stringifying the diff. Reduced repro:Expected:
Actual:
The text was updated successfully, but these errors were encountered: