by ghayes · 4y ago · 0 comments
import chai from 'chai';
chai.config.includeStack = true;
try {
chai.expect(1).to.equals(2);
} catch (e) {
console.log(e.stack);
}
In the REPL, I'm getting `e` as an AssertionError with a trace, but in my running code, the error is coming back as a vanilla object without a stacktrace. Sorry that this is clearly not the right forum for this kind of question.