diff options
Diffstat (limited to 'spec/compiler.js')
-rw-r--r-- | spec/compiler.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/compiler.js b/spec/compiler.js index fe4b63a..be1fb00 100644 --- a/spec/compiler.js +++ b/spec/compiler.js @@ -39,7 +39,10 @@ describe('compiler', function() { }); it('can utilize AST instance', function() { - equal(Handlebars.compile(new Handlebars.AST.Program([ new Handlebars.AST.ContentStatement('Hello')], null, {}))(), 'Hello'); + equal(Handlebars.compile({ + type: 'Program', + body: [ {type: 'ContentStatement', value: 'Hello'}] + })(), 'Hello'); }); it('can pass through an empty string', function() { @@ -58,7 +61,10 @@ describe('compiler', function() { }); it('can utilize AST instance', function() { - equal(/return "Hello"/.test(Handlebars.precompile(new Handlebars.AST.Program([ new Handlebars.AST.ContentStatement('Hello')]), null, {})), true); + equal(/return "Hello"/.test(Handlebars.precompile({ + type: 'Program', + body: [ {type: 'ContentStatement', value: 'Hello'}] + })), true); }); it('can pass through an empty string', function() { |