Add devDependencies: mocha (test runner) and istanbul (to measure code
coverage)
Add npm test lifecycle script: now npm test will run the mocha tests,
wrapped with istanbul to measure coverage. Test coverage is not amazing
so far, but that's a start :=)
Changes highlights:
package.json
Add npm test lifecycle script: now
npm test
will run the mocha tests, wrapped with istanbul to measure coverage. Test coverage is not amazing so far, but that's a start :=)Statements : 46.21% ( 61/132 ) Branches : 49.3% ( 35/71 ) Functions : 53.57% ( 15/28 ) Lines : 49.18% ( 60/122 )
test/phantom-html2pdf.test.js: The test file for phantom-html2pdf.js (todo: add tests for other files)
.gitignore: add the coverage files and the data directory of my favorite IDE