Error: connect ECONNREFUSED when integration testing a Node.js app
In an express.js app that I was integration testing using Mocha the tests suddenly started acting weird with complaint such as:
"before all" hook: Error: connect ECONNREFUSED
Turned out the root cause was a test method that should have been asynchronous wasn't, it was declared as function() instead of function(done). Pretty obvious in hindsight but with an error message like that it took a while to locate.
- Exception order when awaiting multiple async tasks in C#
- Detecting mouse and keyboard input with .NET
- Learning Scala part eight – Scala’s type hierarchy and object equality
- Rhino Mocks - Use Arg<T> ONLY within a mock method call while recording
- Inversion of Control – It’s broader than just injecting components
- jQuery developers, where is the progressive enhancement?