Skip to content Skip to sidebar Skip to footer
Showing posts with the label Mocha.js

After Stubbing Function Still It Calls The Real Function

I have stubbed the content of file, so I can run through only outer function file.html file.js … Read more After Stubbing Function Still It Calls The Real Function

Sinon.js Stub A Function That Resolves A Promise

I want to use Sinon to stub a function that uses callbacks which resolve a promise: const callback … Read more Sinon.js Stub A Function That Resolves A Promise

Karma Tests Reporting Fast Runs, But Actually Running Slow

This is best explained with a video (or see the gif below): You'll notice that the Karma progr… Read more Karma Tests Reporting Fast Runs, But Actually Running Slow

Mocha Only Running One Test File

My Mocha tests were working fine, but when I added a new module (and test), mocha stopped running a… Read more Mocha Only Running One Test File

Always Getting 'error: Timeout Of 2000ms Exceeded' With Selenium

Good morning, I am currently learning how to drive Selenium with javascript (using mocha). I creat… Read more Always Getting 'error: Timeout Of 2000ms Exceeded' With Selenium

How To Make Nightmare Forcefully Timeout

As the title implies I am trying to make my script timeout forcefully, specifically if a condition … Read more How To Make Nightmare Forcefully Timeout

Is It Possible To Use Es6 Modules In Mocha Tests?

ES6, Windows 10 x64, Node.js 8.6.0, Mocha 3.5.3 Is it possible to use ES6 modules in Mocha tests? I… Read more Is It Possible To Use Es6 Modules In Mocha Tests?

Mocha Tests Using Superagent + Promises Timeout Rather Than Fail With 'expect'

I'm using mocha to run a number of integration tests against an external web service. I use sup… Read more Mocha Tests Using Superagent + Promises Timeout Rather Than Fail With 'expect'