improved test

This commit is contained in:
Chen Asraf
2022-03-03 21:48:13 +02:00
parent cb6e06f1c9
commit f07df79e82

View File

@@ -40,9 +40,15 @@ describe("Utils", () => {
})
})
test("should not do path escaping on non-path compiles", async () => {
expect(handlebarsParse(blankConf, "/home/test/{{name}} \\{{escaped}}.txt", { isPath: false })).toEqual(
"/home/test/test {{escaped}}.txt"
)
expect(
handlebarsParse(
{ ...blankConf, data: { ...blankConf.data, escaped: "value" } },
"/home/test/{{name}} \\{{escaped}}.txt",
{
isPath: false,
}
)
).toEqual("/home/test/test {{escaped}}.txt")
})
})
})