Skip to main content

All Questions

0 votes
1 answer
134 views

Mocha tests fail when Wifi is disconnected

I have some mocha tests that complete without errors when connected to Wifi. I am running the tests using command: ./node_modules/.bin/mocha --recursive -R spec path/to/bootstrap.integration.js path/...
vy218's user avatar
  • 1,017
1 vote
2 answers
528 views

Unhandled rejections in mocha tests from native code

I am getting "unhandled rejection" messages in mocha tests but I am at lost what is the exact source of the problem since this happens asynchronously. I know that I can add an event listener for the ...
teroi's user avatar
  • 1,097
4 votes
1 answer
1k views

Debugging with VS Code + Mocha and breakpoint stops at 'read-only inlined content from source map' file

I know, I know. VS Code version: 1.25.1 Mocha: 4.0.1 Running mocha via launch.json: { "name": "mocha", "protocol": "inspector", "type": "node", "request": "launch", "program": ...
alturium's user avatar
  • 583
1 vote
1 answer
505 views

How to debug why mocha isn't exiting?

I added a new endpoint and one of the tests for that endpoint doesn't exit. I was able to fid some questions about how to debug why a node process doesn't exit, but using these tools with mocha doesn'...
Erik B's user avatar
  • 42.8k
0 votes
1 answer
606 views

mocha --inspect-brk lets me inspect mocha's code - not my own

Following this discussion I attempted to debug a mocha test script via the following: mocha --inspect-brk ./tests/foo.test.js This does indeed present an inspector URL that I can bind to in Chrome, ...
gcbenison's user avatar
  • 12k
5 votes
0 answers
680 views

VSCode Debugging Mocha - Breakpoints Not Working?

I'm trying to debug my mocha tests with VSCode. The tests run to completion, but for some reason any breakpoints I set in my test file are greyed out and ignored with message, "Unverified breakpoints, ...
Joe Chan's user avatar
  • 171
0 votes
1 answer
73 views

Debuggin with mocha, load globals

My goal is to debug one of my tests. I'm using Mocha as a base, and SinonJS for spies, stubs and mocks. For some unknown reason my stub of the ajax method has stopped working. It worked a week ago, ...
Fabio Lolli's user avatar
1 vote
1 answer
1k views

How do I Debug a Javascript Unit Test in Eclipse that is Run with Mocha?

I am able to run my Mocha/Unit.js unit test with this command: mocha fooTest.js I want to set breakpoints in Eclipse and debug this unit test but I only see the following Debug Configuration options ...
javaPlease42's user avatar
  • 4,971
0 votes
2 answers
1k views

mocha installation error: Unexpected end of input

I'm trying to install mocha on my windows 10 but I'm getting this error on the terminal $npm install [email protected] --save-dev npm ERR! Unexpected end of input at 1:19983 npm ERR! a":"./bin/_mocha"},"...
Engineer Passion's user avatar
0 votes
1 answer
180 views

Getting error when debugging Mocha with Visual Studio Code and Node.js

I'm debugging some code using Visual Studio Code, Node.js, mocha and chai. When I run tests using gulp I get no errors, but when I try to debug I get this error: Stacktrace (bbbbbbbb-bbbbbbbb) ...
Jayson Paiva's user avatar
1 vote
0 answers
125 views

debug node cluster using 'node-inspector'

I am trying to debug node tests, written in mocha, which are running using Gulp Spawn Mocha. My Gulp code looks something like this: return gulp.src(mochaGlobs, {read: false}) .pipe(plugins....
Yaniv Efraim's user avatar
  • 6,721
2 votes
1 answer
253 views

Debug Mocha tests with Visual Studio 2013

Most guides I found have old and unreachable links and examples. I have some mocha tests and am trying to debug them with Visual Studio 2013. Currently I've just ran them from the command line with ...
AlexD's user avatar
  • 4,320
3 votes
0 answers
174 views

mocha -d, node-inspector, node debug all freeze with sails

I'm using sails 0.11 with mocha. When I add a debugger; inside a mocha test and then run mocha -d, the server lifts properly but then freezes within the test. Here is a snapshot: above the server ...
monty_lennie's user avatar
  • 3,371
1 vote
1 answer
647 views

Cannot read property '_host' of null when running supertest in node-inspector

I'm fairly new to the Angular world and have been using the angular-fullstack generator + Yeoman to build out a project. I'm using Sublime (not Webstorm) and have been trying to figure out how to set ...
djpark's user avatar
  • 181
2 votes
1 answer
215 views

node.js mocha fallback to debugger on uncaught error

Is there a way in node.js (ideally mocha too) to simulate the behavior of python python -m pdb setup.py test That will fallback to debug interface on if the program throws an uncaught exception. EDIT ...
fakedrake's user avatar
  • 6,886

15 30 50 per page
X