Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Add tests for default params
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Oct 8, 2024
1 parent c32d754 commit 2843b63
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion uvu-tests/remark-includes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,36 @@ This is a partial.
description: "short partial with no defaults and one param",
shouldThrow: false,
input: `This is partial with a {{ param }}`,
expected: {},
expected: {
param: "",
},
},
{
description: "partial with multiple params and no defaults",
shouldThrow: false,
input: `This is a partial with a {{ first }}.
It also includes the {{ second }} param.`,
expected: {
first: "",
second: "",
},
},
{
description: "partial with three params and two defaults",
shouldThrow: false,
input: `
{{ first="1" second="2" }}
This is a partial with a {{ first }}.
It also includes the {{ second }} param.
Finally, there is {{ three }}.
`,
expected: {
first: "1",
second: "2",
third: "",
},
},
{
description: "double curly braces and an equals",
Expand Down

0 comments on commit 2843b63

Please sign in to comment.