diff options
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r-- | spec/qunit_spec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index 317841f..14dbee7 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -165,6 +165,14 @@ test("functions", function() { "functions are bound to the context"); }); +test("functions with context argument", function() { + shouldCompileTo("{{awesome frank}}", + {awesome: function(context) { return context; }, + frank: "Frank"}, + "Frank", "functions are called with context arguments"); +}); + + test("paths with hyphens", function() { shouldCompileTo("{{foo-bar}}", {"foo-bar": "baz"}, "baz", "Paths can contain hyphens (-)"); shouldCompileTo("{{foo.foo-bar}}", {foo: {"foo-bar": "baz"}}, "baz", "Paths can contain hyphens (-)"); |