Skip to content

Commit f07df79

Browse files
committed
improved test
1 parent cb6e06f commit f07df79

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/utils.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@ describe("Utils", () => {
4040
})
4141
})
4242
test("should not do path escaping on non-path compiles", async () => {
43-
expect(handlebarsParse(blankConf, "/home/test/{{name}} \\{{escaped}}.txt", { isPath: false })).toEqual(
44-
"/home/test/test {{escaped}}.txt"
45-
)
43+
expect(
44+
handlebarsParse(
45+
{ ...blankConf, data: { ...blankConf.data, escaped: "value" } },
46+
"/home/test/{{name}} \\{{escaped}}.txt",
47+
{
48+
isPath: false,
49+
}
50+
)
51+
).toEqual("/home/test/test {{escaped}}.txt")
4652
})
4753
})
4854
})

0 commit comments

Comments
 (0)