-
Recent Posts
Archives
Categories
Meta
Monthly Archives: September 2015
Checking log4js output in your node.js testsuite
This post will teach you how to test log4js log statements in your code. You can also find the code below in the `src/log4js-unittest` dir of my blog code repository. Let’s say that we have written this simple node.js module, foo.js . … Continue reading
Posted in JavaScript, node.js, software development
Tagged log output, log4js, logger, mocha, mock, node, node.js, npm, sinon, spy, stub, test, test log output, test suite, unit test
Leave a comment
Combining mongoose and Q in node.js
This post will teach you how to write promise-based mongoose code, using Kris Kowal’s Q library. You can also find the code below in the `src/mongoose-and-q` dir of my blog code repository. We have a mongo database with 3 collections: users, … Continue reading
Posted in JavaScript, node.js, software development
Tagged array of promises, callback, javascript, mongo, mongoose, node, node.js, promise, promises, q
4 Comments