I use Chai.js on Node. The console.log(e) , where e is the exception that Chai.js prints something like expected a to be within 0..3 . How can I exclude Chai.js from including stack trace information?
console.log(e)
expected a to be within 0..3
I have found the answer. I can configure chai to enable stack tracing. Here's the code on the chai approval styles page .
var chai = require('chai'); chai.Assertion.includeStack = true; // defaults to false
I do not use Chai.JS. But if e is an Error object, you can use the object's property stack to get the stack trace.
The core util module can also help you: http://nodejs.org/api/util.html
Source: https://habr.com/ru/post/1445946/More articles:Flow dump analyzer - javacast class exception in weblogic - javaHow to prevent console window from showing in winrun4j - javaHow to create instances on demand? - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1445945/how-do-i-load-one-style-sheet-for-mobile-devices-and-one-for-desktops&usg=ALkJrhjIhIrr4mpJ97hs0WBYdQOW4U4iRASimple RESTful Service Using Jersey and Eclipse - restPlay vimeo video using android android? - javascriptvimeo video game in Android native - androidHow to view available web services on Tomcat? - web-serviceshttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1445951/how-to-create-ie-browser-helper-objects-to-respond-to-specific-mime-file-typeeg-helloword-file&usg=ALkJrhiIEB6U1ZxRTnsoxAZlTAUivKLy3QAll Articles