summaryrefslogtreecommitdiffstats
path: root/spec/utils.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-04-16 15:42:46 -0500
committerkpdecker <kpdecker@gmail.com>2015-04-16 16:43:01 -0500
commite3d3eda2e1e03e997d417affc09974446b4ca701 (patch)
treea6513f267482b1693fd002c20488c6e92095ff2b /spec/utils.js
parent2a02261a5bc78f246c63dd8d467a12f2c1f63734 (diff)
downloadhandlebars.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/utils.js')
-rw-r--r--spec/utils.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/utils.js b/spec/utils.js
index 4582e24..81732c5 100644
--- a/spec/utils.js
+++ b/spec/utils.js
@@ -1,19 +1,17 @@
-/*global Handlebars, shouldCompileTo */
-
describe('utils', function() {
describe('#SafeString', function() {
- it("constructing a safestring from a string and checking its type", function() {
- var safe = new Handlebars.SafeString("testing 1, 2, 3");
+ it('constructing a safestring from a string and checking its type', function() {
+ var safe = new Handlebars.SafeString('testing 1, 2, 3');
if (!(safe instanceof Handlebars.SafeString)) {
throw new Error('Must be instance of SafeString');
}
- equals(safe == 'testing 1, 2, 3', true, 'SafeString is equivalent to its underlying string');
+ equals(safe.toString(), 'testing 1, 2, 3', 'SafeString is equivalent to its underlying string');
});
- it("it should not escape SafeString properties", function() {
- var name = new Handlebars.SafeString("<em>Sean O&#x27;Malley</em>");
+ it('it should not escape SafeString properties', function() {
+ var name = new Handlebars.SafeString('<em>Sean O&#x27;Malley</em>');
- shouldCompileTo('{{name}}', [{ name: name }], "<em>Sean O&#x27;Malley</em>");
+ shouldCompileTo('{{name}}', [{name: name}], '<em>Sean O&#x27;Malley</em>');
});
});