test - no large option the wrong way round

This commit is contained in:
Luke Page 2015-08-07 08:26:27 +01:00
parent b23964c551
commit 6607d71c04
2 changed files with 2 additions and 3 deletions

View file

@ -35,7 +35,7 @@
"coverage": "istanbul -- cover node_modules/tape/bin/tape test/*-spec.js nolarge",
"coverage-report": "npm run coverage && istanbul report html",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"test": "tape test/*-spec.js nolarge | tap-dot && node test/run-compare",
"test": "tape test/*-spec.js | tap-dot && node test/run-compare",
"lint": "eslint lib"
},
"repository": {

View file

@ -2,14 +2,13 @@ var fs = require('fs');
var PNG = require('../lib/png').PNG;
var test = require('tape');
console.dir(process.argv); // temp test to see why io.js is ignoring
var noLargeOption = process.argv.indexOf("nolarge") >= 0;
fs.readdir(__dirname + '/in/', function (err, files) {
if (err) throw err;
files = files.filter(function (file) {
return (noLargeOption || !file.match(/large/i)) && Boolean(file.match(/\.png$/i));
return (!noLargeOption || !file.match(/large/i)) && Boolean(file.match(/\.png$/i));
});
console.log("Converting images");