templateFormatter: fix empty string args not getting counted as arguments; add concat base template function
This commit is contained in:
parent
f7f08ffd3b
commit
8f898ed972
2 changed files with 14 additions and 1 deletions
|
@ -99,3 +99,13 @@ test("Edge case #1", async () => {
|
|||
const result = await renderTemplate("{foo} {bar()}");
|
||||
// No "Unclosed function" exception = success
|
||||
});
|
||||
|
||||
test("Parses empty string args as empty strings", async () => {
|
||||
const result = parseTemplate('{foo("")}');
|
||||
expect(result).toEqual([
|
||||
{
|
||||
identifier: "foo",
|
||||
args: [""],
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue