summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-05-31 13:11:22 -0400
committerkpdecker <kpdecker@gmail.com>2013-05-31 13:11:22 -0400
commitef062adcc24ea2c1c617cbe54de6d8982d739a40 (patch)
treec3e4ddf42d7fb727533a9aae082c43c8cebf1dfd /spec/qunit_spec.js
parent20242095197c998d89d1bc2d08895422c73f36d4 (diff)
downloadhandlebars.js-ef062adcc24ea2c1c617cbe54de6d8982d739a40.zip
handlebars.js-ef062adcc24ea2c1c617cbe54de6d8982d739a40.tar.gz
handlebars.js-ef062adcc24ea2c1c617cbe54de6d8982d739a40.tar.bz2
Move external AST tests into qunit spec
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 14dbee7..ec58570 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -1538,6 +1538,10 @@ test("Passing falsy values to Handlebars.compile throws an error", function() {
}, "You must pass a string or Handlebars AST to Handlebars.precompile. You passed null");
});
+test("can pass through an already-compiled AST via compile/precompile", function() {
+ equal(Handlebars.compile(new Handlebars.AST.ProgramNode([ new Handlebars.AST.ContentNode("Hello")]))(), 'Hello')
+});
+
test('GH-408: Multiple loops fail', function() {
var context = [
{ name: "John Doe", location: { city: "Chicago" } },