fix: stack overflow on large number of templates, #513

This commit is contained in:
Harttle
2022-07-08 01:46:51 +08:00
parent 2f87708989
commit 3dc4290b56
16 changed files with 172 additions and 180 deletions
+5 -3
View File
@@ -126,11 +126,13 @@ describe('LiquidOptions#cache', function () {
extname: '.html',
cache: true
})
try { await engine.renderFile('foo') } catch (err) {}
try {
await engine.renderFile('foo')
} catch (err) {}
mock({ '/root/foo.html': 'foo' })
const y = await engine.renderFile('foo')
expect(y).to.equal('foo')
const html = await engine.renderFile('foo')
expect(html).to.equal('foo')
})
})