Permalink
Browse files

Fix build in windows

1 parent bff3af5 commit 275ab37b2edee3d894d6a781ba97b1219c2dac07 @blikblum blikblum committed Aug 21, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 tasks/test.js
View
@@ -5,13 +5,14 @@ module.exports = function(grunt) {
grunt.registerTask('test:bin', function() {
var done = this.async();
- childProcess.exec('./bin/handlebars -a spec/artifacts/empty.handlebars', function(err, stdout) {
+ childProcess.exec('node ./bin/handlebars -a spec/artifacts/empty.handlebars', function(err, stdout) {
if (err) {
throw err;
}
- var expected = fs.readFileSync('./spec/expected/empty.amd.js');
- if (stdout.toString() !== expected.toString()) {
+ var expected = fs.readFileSync('./spec/expected/empty.amd.js').toString().replace(/\r\n/g, '\n');
+
+ if (stdout.toString() !== expected) {
throw new Error('Expected binary output differed:\n\n"' + stdout + '"\n\n"' + expected + '"');
}

0 comments on commit 275ab37

Please sign in to comment.