summaryrefslogtreecommitdiffstats
path: root/spec/utils.js
diff options
context:
space:
mode:
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>');
});
});