Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore committed Oct 28, 2016
1 parent 175711f commit a58a6f4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
"test-local": "egg-bin test",
"test-examples": "cross-env TESTS=examples/**/test/**/*.test.js egg-bin test",
"cov": "egg-bin cov",
"ci": "npm run lint && npm run test-examples && npm run cov",
"ci": "npm run lint && npm run test-examples && npm run cov || npm run check",
"check": "node test.js",
"doc-server": "./scripts/doc.sh server",
"doc-deploy": "./scripts/doc.sh deploy",
"autod": "autod",
Expand Down
24 changes: 24 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

const fs = require('fs');
const path = require('path');
const coverageDir = path.join(__dirname, 'coverage');

console.log(coverageDir, fs.existsSync(coverageDir));

const files = fs.readdirSync(coverageDir);
for (let file of files) {
if (!/coverage.*?.json$/.test(file)) {
continue;
}

file = path.join(coverageDir, file);
console.log('reading', file);
try {
console.log(JSON.parse(fs.readFileSync(file, 'utf8')));
} catch (e) {
console.log('read error', file, e);
}
}

process.exit(1);

0 comments on commit a58a6f4

Please sign in to comment.