feature: template file lookup error message

This commit is contained in:
harttle
2016-11-01 00:22:41 +08:00
parent 9961afa3dd
commit f8269f4d20
4 changed files with 44 additions and 12 deletions
+8 -3
View File
@@ -48,9 +48,14 @@ describe('engine#express()', function() {
var file = '/not-exist.html';
var ctx = {};
engine.express().call(view, file, ctx, function(err) {
expect(err.code).to.equal('ENOENT');
console.log(err.message);
done();
try{
expect(err.code).to.equal('ENOENT');
expect(err.message).to.match(/Failed to lookup/);
done();
}
catch(e){
done(e);
}
});
});
it('should respect root option when lookup', function(done) {