summaryrefslogtreecommitdiff
path: root/specs/dot-notation.json
diff options
context:
space:
mode:
Diffstat (limited to 'specs/dot-notation.json')
-rw-r--r--specs/dot-notation.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/specs/dot-notation.json b/specs/dot-notation.json
new file mode 100644
index 0000000..a91767e
--- /dev/null
+++ b/specs/dot-notation.json
@@ -0,0 +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."}]} \ No newline at end of file