TAG: javascript

Testing service objects in Node.js (Mocha)

Testing service objects in Node.js (Mocha) Let’s continue our journey with service objects in Node.js. If you haven’t read a first part, here you have a change. Today we will show how to test them. But first of all - let me start with how to...

Service objects in Node.js

In MVC frameworks it’s usual that controllers contain a lot of code and are the hardest part to understand; in consequence - to debug and refactor. Why? One of the answers would be: controllers don’t respect Single Responsibility Principle. Their job starts when they receive an HTTP request,...