Skip to content

Commit

Permalink
Don't do coverage on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexindigo committed Aug 12, 2016
1 parent 51f7a0d commit fcf2596
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions compatibility.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
var batcher = require('batcher')
var os = require('os')
, batcher = require('batcher')
, grid = require('./compatibility.json')
, versions = process.versions.node.split('.')
, supported
, commands
, jobs
, command
;

// istanbul doesn't play nice on windows
if (os.platform() == 'win32')
{
command = 'npm install ${name}@${version} && tape test/test-${name}*.js | tap-spec';
}
else
{
command = 'npm install ${name}@${version} && istanbul cover --include-pid tape -- test/test-${name}*.js | tap-spec';
}

// find most specific version
versions.forEach(function(v)
{
Expand All @@ -16,10 +28,10 @@ versions.forEach(function(v)
}
});

commands = Object.keys(supported).map(function(name)
jobs = Object.keys(supported).map(function(name)
{
return batcher.forEach({ name: name, version: supported[name] }).command('npm install ${name}@${version} && istanbul cover --include-pid tape -- test/test-${name}*.js | tap-spec');
return batcher.forEach({ name: name, version: supported[name] }).command(command);
});

// run all the versions one by one
batcher(commands);
batcher(jobs);

0 comments on commit fcf2596

Please sign in to comment.