Re-enables batch tests on Windows. (#869)
authorAlex Lam S.L <alexlamsl@gmail.com>
Tue, 24 Jan 2017 09:30:00 +0000 (17:30 +0800)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Tue, 24 Jan 2017 09:30:00 +0000 (10:30 +0100)
Fix up assertEqualLineByLine(), checks if number of lines are equal before verifying content.

test/batch-test.js

index 6497605..b984075 100644 (file)
@@ -7,14 +7,11 @@ var vows = require('vows');
 
 var lineBreak = require('os').EOL;
 
-if (process.platform == 'win32') {
-  return;
-}
-
 function assertEqualLineByLine(expected, actual) {
   var expectedLines = expected.split(lineBreak);
   var actualLines = actual.split(lineBreak);
 
+  assert.equal(expectedLines.length, actualLines.length);
   expectedLines.forEach(function (line, i) {
     assert.equal(line, actualLines[i]);
   });