Example of unit testing with NodeJS, Promises with unit tests