test: coverage to 100%

This commit is contained in:
Harttle
2021-10-01 15:55:31 +08:00
committed by harttle
parent 9a96b4aba3
commit 4358c9630f
11 changed files with 115 additions and 65 deletions
+9
View File
@@ -130,4 +130,13 @@ describe('Liquid', function () {
.to.throw(/Failed to lookup "\/not\/exist.html" in "\/boo,\/root\/"/)
})
})
describe('#enderToNodeStream', function () {
const engine = new Liquid()
it('should render a simple value', function (done) {
const stream = engine.renderToNodeStream(engine.parse('{{"foo"}}'))
let html = ''
stream.on('data', data => { html += data })
stream.on('end', () => { expect(html).to.equal('foo'); done() })
})
})
})