diff options
author | kpdecker <kpdecker@gmail.com> | 2015-04-16 15:42:46 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-04-16 16:43:01 -0500 |
commit | e3d3eda2e1e03e997d417affc09974446b4ca701 (patch) | |
tree | a6513f267482b1693fd002c20488c6e92095ff2b /spec/javascript-compiler.js | |
parent | 2a02261a5bc78f246c63dd8d467a12f2c1f63734 (diff) | |
download | handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.zip handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.tar.gz handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.tar.bz2 |
Add full support for es6
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.
Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.
Fixes #855
Fixes #993
Diffstat (limited to 'spec/javascript-compiler.js')
-rw-r--r-- | spec/javascript-compiler.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/javascript-compiler.js b/spec/javascript-compiler.js index fb78658..28e6988 100644 --- a/spec/javascript-compiler.js +++ b/spec/javascript-compiler.js @@ -1,4 +1,3 @@ -/*global Handlebars, beforeEach, handlebarsEnv, shouldCompileTo */ describe('javascript-compiler api', function() { if (!Handlebars.JavaScriptCompiler) { return; @@ -17,13 +16,15 @@ describe('javascript-compiler api', function() { handlebarsEnv.JavaScriptCompiler.prototype.nameLookup = function(parent, name) { return parent + '.bar_' + name; }; - shouldCompileTo("{{foo}}", { bar_foo: "food" }, "food"); + /*eslint-disable camelcase */ + shouldCompileTo('{{foo}}', { bar_foo: 'food' }, 'food'); + /*eslint-enable camelcase */ }); // Tests nameLookup dot vs. bracket behavior. Bracket is required in certain cases // to avoid errors in older browsers. it('should handle reserved words', function() { - shouldCompileTo("{{foo}} {{~null~}}", { foo: "food" }, "food"); + shouldCompileTo('{{foo}} {{~null~}}', { foo: 'food' }, 'food'); }); }); describe('#compilerInfo', function() { @@ -45,7 +46,7 @@ describe('javascript-compiler api', function() { throw new Error('It didn\'t work'); } }; - shouldCompileTo("{{foo}} ", { foo: "food" }, "food "); + shouldCompileTo('{{foo}} ', { foo: 'food' }, 'food '); }); }); describe('buffer', function() { @@ -65,13 +66,13 @@ describe('javascript-compiler api', function() { handlebarsEnv.JavaScriptCompiler.prototype.initializeBuffer = function() { return this.quotedString('foo_'); }; - shouldCompileTo("{{foo}} ", { foo: "food" }, "foo_food "); + shouldCompileTo('{{foo}} ', { foo: 'food' }, 'foo_food '); }); it('should allow append buffer override', function() { handlebarsEnv.JavaScriptCompiler.prototype.appendToBuffer = function(string) { return $superAppend.call(this, [string, ' + "_foo"']); }; - shouldCompileTo("{{foo}}", { foo: "food" }, "food_foo"); + shouldCompileTo('{{foo}}', { foo: 'food' }, 'food_foo'); }); }); }); |