summaryrefslogtreecommitdiff
path: root/specs/dot-notation.json
blob: a91767e9134a341527f4333c88e9b44796897012 (plain)
1
{"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","tests":[{"name":"Basic Example","data":{"person":{"name":"Joe"}},"expected":"\"Joe\" == \"Joe\"","template":"\"{{person.name}}\" == \"{{#person}}{{name}}{{/person}}\"","desc":"Dot notation should be a form of shorthand for sections."},{"name":"Arbitrary Depth","data":{"a":{"b":{"c":{"d":{"e":{"name":"Phil"}}}}}},"expected":"\"Phil\" == \"Phil\"","template":"\"{{a.b.c.d.e.name}}\" == \"Phil\"","desc":"Dot notation should be functional to any level of nesting."},{"name":"Broken Chain","data":{"a":{}},"expected":"\"\" == \"\"","template":"\"{{a.b.c}}\" == \"\"","desc":"Any falsey value prior to the last part of the name should yield ''."},{"name":"Broken Chain Resolution","data":{"a":{"b":{}},"c":{"name":"Jim"}},"expected":"\"\" == \"\"","template":"\"{{a.b.c.name}}\" == \"\"","desc":"Each part of a dotted name should be resolved only against its elder."},{"name":"Initial Key Resolution","data":{"a":{"b":{"c":{"d":{"e":{"name":"Phil"}}}}},"b":{"c":{"d":{"e":{"name":"Wrong"}}}}},"template":"\"Phil\" == \"Phil\"","desc":"The first part of a dotted name should resolve as any other name."}]}