mirror of
https://github.com/danbulant/pngjs
synced 2026-09-18 05:43:53 +00:00
Code coverage
This commit is contained in:
parent
7c6f744795
commit
3a3b1ef242
4 changed files with 15 additions and 8 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
.idea
|
||||
.idea
|
||||
coverage
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
language: node_js
|
||||
after_success: npm run coverage && cat ./coverage/lcov.info | coveralls
|
||||
node_js:
|
||||
- "0.12"
|
||||
- "iojs"
|
||||
|
|
|
|||
16
package.json
16
package.json
|
|
@ -13,16 +13,16 @@
|
|||
],
|
||||
"homepage": "https://github.com/lukeapage/pngjs2",
|
||||
"keywords": [
|
||||
"png",
|
||||
"PNG",
|
||||
"parser",
|
||||
"encoder",
|
||||
"decoder",
|
||||
"pngjs",
|
||||
"encoder",
|
||||
"js-png",
|
||||
"node-png",
|
||||
"png-parse",
|
||||
"parser",
|
||||
"png",
|
||||
"png-js",
|
||||
"js-png"
|
||||
"png-parse",
|
||||
"pngjs"
|
||||
],
|
||||
"engines": {
|
||||
"node": "0.10.x"
|
||||
|
|
@ -32,6 +32,8 @@
|
|||
"example": "examples"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "istanbul -- cover ./test nolarge",
|
||||
"coverage-report": "npm run coverage && istanbul report html",
|
||||
"test": "node test"
|
||||
},
|
||||
"repository": {
|
||||
|
|
@ -44,6 +46,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"connect": "^3.4.0",
|
||||
"coveralls": "^2.11.3",
|
||||
"istanbul": "^0.3.17",
|
||||
"phantomjs": "^1.9.17",
|
||||
"serve-static": "^1.10.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module.exports = function(done) {
|
|||
if (err) throw err;
|
||||
|
||||
files = files.filter(function(file) {
|
||||
return Boolean(file.match(/\.png$/i));
|
||||
return ((process.argv[2] || "").indexOf("nolarge") < 0 || !file.match(/large/i)) && Boolean(file.match(/\.png$/i));
|
||||
});
|
||||
|
||||
console.log("Converting images");
|
||||
|
|
@ -24,6 +24,7 @@ module.exports = function(done) {
|
|||
|
||||
files.forEach(function (file) {
|
||||
|
||||
console.log(file);
|
||||
var expectedError = false;
|
||||
if (file.match(/^x/)) {
|
||||
expectedError = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue