This commit is contained in:
harttle
2017-10-30 02:07:07 +08:00
parent e8fa8d32f5
commit a239389044
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -24,6 +24,7 @@ describe('liquid', function () {
strict_filters: true
})
mock({
'/root/files/bar': 'bar',
'/root/files/foo.html': 'foo',
'/root/files/name.html': 'My name is {{name}}.',
'/un-readable.html': mock.file({
@@ -91,6 +92,11 @@ describe('liquid', function () {
return expect(engine.renderFile('/root/files/foo.html', ctx))
.to.eventually.equal('foo')
})
it('should find files without extname', function () {
var engine = Liquid({root: '/root', extname: ''})
return expect(engine.renderFile('/root/files/bar', ctx))
.to.eventually.equal('bar')
})
it('should accept relative path', function () {
return expect(engine.renderFile('files/foo.html'))
.to.eventually.equal('foo')