From 93433a8b30c6adae42c26a7c9990a5a0e1ff4704 Mon Sep 17 00:00:00 2001 From: Cristofer Gonzales Date: Mon, 23 Mar 2020 10:03:13 -0300 Subject: [PATCH] fix: return variable name in include error --- src/builtin/tags/include.ts | 2 +- test/integration/builtin/tags/include.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtin/tags/include.ts b/src/builtin/tags/include.ts index daef7d4b6..aa11511a5 100644 --- a/src/builtin/tags/include.ts +++ b/src/builtin/tags/include.ts @@ -29,7 +29,7 @@ export default { ? yield renderer.renderTemplates(liquid.parse(evalQuotedToken(file)), ctx) : yield evalToken(file, ctx)) : file.getText() - assert(filepath, () => `illegal filename "${file}":"${filepath}"`) + assert(filepath, () => `illegal filename "${file.getText()}":"${filepath}"`) const saved = ctx.saveRegister('blocks', 'blockMode') ctx.setRegister('blocks', {}) diff --git a/test/integration/builtin/tags/include.ts b/test/integration/builtin/tags/include.ts index ba10602db..fb9263b91 100644 --- a/test/integration/builtin/tags/include.ts +++ b/test/integration/builtin/tags/include.ts @@ -44,7 +44,7 @@ describe('tags/include', function () { }) return liquid.renderFile('/parent.html').catch(function (e) { expect(e.name).to.equal('RenderError') - expect(e.message).to.match(/illegal filename/) + expect(e.message).to.match(/illegal filename "not-exist"/) }) })