mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 06:20:38 -07:00
fix istanbul report writting by mock.restore in test/util/error.js
This commit is contained in:
+1
-1
@@ -4,4 +4,4 @@ node_js:
|
|||||||
before_script:
|
before_script:
|
||||||
- npm install -g mocha
|
- npm install -g mocha
|
||||||
after_script:
|
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
|
||||||
|
|||||||
@@ -29,10 +29,6 @@ module.exports = function(liquid) {
|
|||||||
.then((partial) => {
|
.then((partial) => {
|
||||||
scope.pop();
|
scope.pop();
|
||||||
return partial;
|
return partial;
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
e.file = layout;
|
|
||||||
throw e;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ describe('engine#express()', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
after(function(){
|
||||||
|
mock.restore();
|
||||||
|
});
|
||||||
it('should render templates', function(done) {
|
it('should render templates', function(done) {
|
||||||
request(app).get('/name')
|
request(app).get('/name')
|
||||||
.expect('My name is harttle.')
|
.expect('My name is harttle.')
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ describe('error', function() {
|
|||||||
expect(err.input).to.equal('{% raw %}');
|
expect(err.input).to.equal('{% raw %}');
|
||||||
expect(err.line).to.equal(4);
|
expect(err.line).to.equal(4);
|
||||||
expect(err.file).to.equal('/foo.html');
|
expect(err.file).to.equal('/foo.html');
|
||||||
|
mock.restore();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user