I faced the situation that the 'development' configuration is loaded rather than 'test' when run tests.
I found the cause is in Gruntfile.js
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var config = require('./lib/config/config');
Because this code(from fix(gruntfile): update gruntfile to use port from config #121), the configuration is loaded before NODE_ENV is set to 'test'
This problem is critical to model tests and other unit tests not using a repository test double.