Questions tagged [yiewd]

2 questions
18
votes
0 answers

Is there a way to enable console.log while running mocha tests?

I'm using mocha along with yeiwd and chai to test a javascript web application. I'd like to see console logs from within the application to help debug some tests. When I run the tests from the comand line with npm test I don't see any console.log()…
barry
  • 4,037
  • 6
  • 41
  • 68
0
votes
0 answers

Exposing a function for testing

I'm using mocha via the command line to test a web application. There is a function that exists solely to assist unit tests and is exposed only to unit tests. This is how that is accomplished: function inUnitTest() { return typeof window.QUnit…
barry
  • 4,037
  • 6
  • 41
  • 68