mirror of
https://github.com/danbulant/pngjs
synced 2026-09-20 06:43:54 +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
|
node_modules
|
||||||
.idea
|
.idea
|
||||||
|
coverage
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
|
after_success: npm run coverage && cat ./coverage/lcov.info | coveralls
|
||||||
node_js:
|
node_js:
|
||||||
- "0.12"
|
- "0.12"
|
||||||
- "iojs"
|
- "iojs"
|
||||||
|
|
|
||||||
16
package.json
16
package.json
|
|
@ -13,16 +13,16 @@
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/lukeapage/pngjs2",
|
"homepage": "https://github.com/lukeapage/pngjs2",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"png",
|
|
||||||
"PNG",
|
"PNG",
|
||||||
"parser",
|
|
||||||
"encoder",
|
|
||||||
"decoder",
|
"decoder",
|
||||||
"pngjs",
|
"encoder",
|
||||||
|
"js-png",
|
||||||
"node-png",
|
"node-png",
|
||||||
"png-parse",
|
"parser",
|
||||||
|
"png",
|
||||||
"png-js",
|
"png-js",
|
||||||
"js-png"
|
"png-parse",
|
||||||
|
"pngjs"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "0.10.x"
|
"node": "0.10.x"
|
||||||
|
|
@ -32,6 +32,8 @@
|
||||||
"example": "examples"
|
"example": "examples"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"coverage": "istanbul -- cover ./test nolarge",
|
||||||
|
"coverage-report": "npm run coverage && istanbul report html",
|
||||||
"test": "node test"
|
"test": "node test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -44,6 +46,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"connect": "^3.4.0",
|
"connect": "^3.4.0",
|
||||||
|
"coveralls": "^2.11.3",
|
||||||
|
"istanbul": "^0.3.17",
|
||||||
"phantomjs": "^1.9.17",
|
"phantomjs": "^1.9.17",
|
||||||
"serve-static": "^1.10.0"
|
"serve-static": "^1.10.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ module.exports = function(done) {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|
||||||
files = files.filter(function(file) {
|
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");
|
console.log("Converting images");
|
||||||
|
|
@ -24,6 +24,7 @@ module.exports = function(done) {
|
||||||
|
|
||||||
files.forEach(function (file) {
|
files.forEach(function (file) {
|
||||||
|
|
||||||
|
console.log(file);
|
||||||
var expectedError = false;
|
var expectedError = false;
|
||||||
if (file.match(/^x/)) {
|
if (file.match(/^x/)) {
|
||||||
expectedError = true;
|
expectedError = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue