Top "Mocha" questions

Mocha.

What's the right way to enable the node debugger with mocha's --debug-brk switch?

I have some debugger statements in my module under test and want to run mocha with --debug-brk set and hit …

node.js javascript-events mocha
Cannot find module 'ts-node/register'

I want to use mocha to test my TypeScript/Angular2 project. I tried to use ts-node as described here: npm …

node.js typescript mocha
eslint should be listed in the project's dependencies, not devDependencies

Either I don't understand dependencies vs. devDependencies in node 100% yet or eslint is just wrong here (not capable of analyzing …

javascript node.js tdd mocha enzyme
How to unit test console output with mocha on nodejs?

Take into account the following example Javascript code below: function privateFunction (time) { if (time < 12) { console.log('Good morning'); } if (…

node.js unit-testing automated-tests mocha sinon
How do i test my express app with mocha?

I've just added shouldjs and mocha to my express app for testing, but I'm wondering how to test my application. …

node.js express mocha
How to mock request and response in nodejs to test middleware/controllers?

My application has several layers: middleware, controllers, managers. Controllers interface is identical to middlewares one: (req, res, next). So my …

node.js testing express integration-testing mocha
How to test nodejs backend code with Karma (testacular)

How do I setup Karma to run my backend unit tests (written with Mocha)? If I add my backend test …

node.js mocha karma-runner
Mocha breakpoints using Visual Studio Code

Is it possible to add breakpoints to ones Mocha tests using Visual Studio Code? Normally when debugging code one need …

node.js visual-studio-code mocha tdd
Protractor error message "unsupported command-line flag" in Chrome?

I'm a new user to Protractor, and I encountered this error running my tests using Chrome (error displays beneath the …

javascript node.js selenium mocha protractor
Chai - Testing for values in array of objects

I am setting up my tests for the results to a REST endpoint that returns me an array of Mongo …

arrays mocha chai