feature: template string for {%include%} argument, #72

This commit is contained in:
harttle
2018-07-24 14:49:23 +08:00
parent 48484fe52f
commit 7ab0e96419
2 changed files with 35 additions and 15 deletions
+8
View File
@@ -23,6 +23,14 @@ describe('tags/include', function () {
return expect(liquid.renderFile('/current.html')).to
.eventually.equal('barfoobar')
})
it('should support template string', function () {
mock({
'/current.html': 'bar{% include "bar/{{name}}" %}bar',
'/bar/foo.html': 'foo'
})
return expect(liquid.renderFile('/current.html', {name: 'foo.html'})).to
.eventually.equal('barfoobar')
})
it('should throw when not specified', function () {
mock({