mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix: branch coverage
This commit is contained in:
@@ -24,6 +24,16 @@ describe('tags/include', function () {
|
||||
.eventually.equal('barfoobar')
|
||||
})
|
||||
|
||||
it('should throw when not specified', function () {
|
||||
mock({
|
||||
'/parent.html': '{%include%}'
|
||||
})
|
||||
return liquid.renderFile('/parent.html').catch(function (e) {
|
||||
expect(e.name).to.equal('RenderError')
|
||||
expect(e.message).to.match(/cannot include with empty filename/)
|
||||
})
|
||||
})
|
||||
|
||||
it('should throw when not exist', function () {
|
||||
mock({
|
||||
'/parent.html': '{%include not-exist%}'
|
||||
|
||||
@@ -24,6 +24,15 @@ describe('tags/layout', function () {
|
||||
return expect(liquid.parseAndRender(src)).to
|
||||
.be.rejectedWith(/tag {%block%} not closed/)
|
||||
})
|
||||
it('should throw when filename not specified', function () {
|
||||
mock({
|
||||
'/parent.html': '{%layout%}'
|
||||
})
|
||||
return liquid.renderFile('/parent.html').catch(function (e) {
|
||||
expect(e.name).to.equal('RenderError')
|
||||
expect(e.message).to.match(/cannot apply layout with empty filename/)
|
||||
})
|
||||
})
|
||||
describe('anonymous block', function () {
|
||||
it('should handle anonymous block', function () {
|
||||
mock({
|
||||
|
||||
Reference in New Issue
Block a user