Test a generator with no data, a repeat or count of 0 rendering nothing, and a name a choice's item binds and reads
This commit is contained in:
+3
-1
@@ -51,7 +51,9 @@ func TestAPartWithNoEffectRendersAsWithoutIt(t *testing.T) {
|
||||
`{"format":"{word as w}x","word":["a","b"]}`: `"x"`,
|
||||
`null`: `""`,
|
||||
`{"format":"{p}","p":{"format":"{x}","x":[null,"a"]}}`: `{"format":"{p}","p":{"format":"{x}","x":["","a"]}}`,
|
||||
`"{int(5,5)}"`: `"5"`,
|
||||
`"{int(5,5)}"`: `"5"`,
|
||||
`{"format":"{x}","x":["a","b"],"repeat":0}`: `""`,
|
||||
`"{digits(0)}{upper(0)}{lower(0)}{hex(0)}{base64(0)}{nanoid(0)}"`: `""`,
|
||||
`"{float(1,1,2)}"`: `"1.00"`,
|
||||
`"{date(1990-01-01,1990-01-01,'2006-01-02')}"`: `"1990-01-01"`,
|
||||
`"{date(1990-01-01,1990-12-31,'x')}"`: `"x"`,
|
||||
|
||||
Reference in New Issue
Block a user