diff --git a/test/print.test.ts b/test/print.test.ts index 6e83ef0..8a69d1d 100644 --- a/test/print.test.ts +++ b/test/print.test.ts @@ -180,3 +180,20 @@ Deno.test({ }); }, }); + +Deno.test({ + name: "Print key variables", + fn: async () => { + await test({ + // It should work like {{ message[it.key] }} + template: `{{ message[key] }}`, + expected: "It works!", + data: { + message: { + foo: "It works!", + }, + key: "foo", + }, + }); + }, +});