summaryrefslogtreecommitdiffstats
path: root/spec/parser.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-08-18 23:57:27 -0700
committerkpdecker <kpdecker@gmail.com>2015-08-18 23:57:27 -0700
commit95d84badcae89aa72a6f1433b851304700320920 (patch)
tree78dfd5cad87cb77d4353484781ff580bcbf2ad1c /spec/parser.js
parent9a2d1d6009406915d1ca177ed5321e4727b9776f (diff)
downloadhandlebars.js-95d84badcae89aa72a6f1433b851304700320920.zip
handlebars.js-95d84badcae89aa72a6f1433b851304700320920.tar.gz
handlebars.js-95d84badcae89aa72a6f1433b851304700320920.tar.bz2
Drop AST constructors in favor of JSON
These were little more than object literal statements that were less clear due to their use of index-based arguments. Fixes #1077
Diffstat (limited to 'spec/parser.js')
-rw-r--r--spec/parser.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/parser.js b/spec/parser.js
index 424e2d1..82c32d0 100644
--- a/spec/parser.js
+++ b/spec/parser.js
@@ -228,7 +228,10 @@ describe('parser', function() {
describe('externally compiled AST', function() {
it('can pass through an already-compiled AST', function() {
- equals(astFor(new Handlebars.AST.Program([new Handlebars.AST.ContentStatement('Hello')], null)), 'CONTENT[ \'Hello\' ]\n');
+ equals(astFor({
+ type: 'Program',
+ body: [ {type: 'ContentStatement', value: 'Hello'}]
+ }), 'CONTENT[ \'Hello\' ]\n');
});
});