fix(test): Fix unit test and make sure mocha exit with 1 when failing