Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a test for separator option

  • Loading branch information...
commit 10a57f6d5b3577f808428353d9fc096e516787f6 1 parent 21e4c3c
@pdokas pdokas authored
View
8 Gruntfile.js
@@ -113,6 +113,14 @@ module.exports = function(grunt) {
files: {
'tmp/amd_compile_direct.js': ['test/fixtures/amd.html']
}
+ },
+ custom_separator: {
+ options: {
+ separator: ';;;;;'
+ },
+ files: {
+ 'tmp/custom_separator.js': ['test/fixtures/basic.hbs']
+ }
}
},
// Unit tests.
View
8 test/expected/custom_separator.js
@@ -0,0 +1,8 @@
+this["JST"] = this["JST"] || {};;;;;;this["JST"]["test/fixtures/basic.hbs"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
+ this.compilerInfo = [2,'>= 1.0.0-rc.3'];
+helpers = helpers || Handlebars.helpers; data = data || {};
+
+
+
+ return "Basic template that does nothing.";
+ });
View
10 test/handlebars_test.js
@@ -100,5 +100,15 @@ exports.handlebars = {
test.equal(actual, expected, 'should wrap everything with an AMD define block and directly return the template.');
test.done();
+ },
+ custom_separator: function(test) {
+ 'use strict';
+ test.expect(1);
+
+ var actual = grunt.file.read('tmp/custom_separator.js');
+ var expected = grunt.file.read('test/expected/custom_separator.js');
+ test.equal(actual, expected, 'should use custom file separators as specified.');
+
+ test.done();
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.