How can I make the exception of Chai.js include stack trace info?
chai, exception, node.js, stack-trace
Solution
I found the answer. I can config chai to enable stack trace. Here's the code on assertion styles page of chai.
var chai = require('chai');
chai.Assertion.includeStack = true; // defaults to false
Problem
I am using Chai.js on Node. The line `console.log(e)` where e is an exception thrown by Chai.js print something like `expected a to be within 0..3`. How can I make the exception of Chai.js include stack trace info?