From dab98cd28f71b17b533c3b592c97d9d7cf76d978 Mon Sep 17 00:00:00 2001 From: Oscar Otero Date: Sat, 6 Apr 2024 00:49:26 +0200 Subject: [PATCH] add failing test --- test/print.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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", + }, + }); + }, +});