fix: enforce root containment for renderFile/parseFile lookups (#870)

Made-with: Cursor
This commit is contained in:
Yang Jun
2026-04-07 23:18:53 +08:00
committed by GitHub
parent db4348507e
commit f41c1fc02f
5 changed files with 31 additions and 10 deletions
+1
View File
@@ -38,6 +38,7 @@ describe('#renderFile()', function () {
return expect(html).toContain('"name": "liquidjs"')
})
it('should render file with context', async function () {
engine = new Liquid({ root: views, extname: '.html' })
const html = await engine.renderFile(resolve(views, 'name.html'), { name: 'harttle' })
return expect(html).toBe('My name is harttle.')
})