fix istanbul report writting by mock.restore in test/util/error.js

This commit is contained in:
harttle
2016-11-01 23:09:47 +08:00
parent 951225fb75
commit ce99bb56eb
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -4,4 +4,4 @@ node_js:
before_script:
- npm install -g mocha
after_script:
- NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --recursive && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- NODE_ENV=test ./node_modules/.bin/istanbul cover --report lcovonly ./node_modules/mocha/bin/_mocha -- -R spec --recursive && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
-4
View File
@@ -29,10 +29,6 @@ module.exports = function(liquid) {
.then((partial) => {
scope.pop();
return partial;
})
.catch((e) => {
e.file = layout;
throw e;
});
}
});
+3
View File
@@ -36,6 +36,9 @@ describe('engine#express()', function() {
});
});
});
after(function(){
mock.restore();
});
it('should render templates', function(done) {
request(app).get('/name')
.expect('My name is harttle.')
+1
View File
@@ -40,6 +40,7 @@ describe('error', function() {
expect(err.input).to.equal('{% raw %}');
expect(err.line).to.equal(4);
expect(err.file).to.equal('/foo.html');
mock.restore();
});
});