refactor: test and coverage script

This commit is contained in:
Clark Du 2018-03-19 13:53:48 +08:00
parent e8ed1e5809
commit c12c5502ee
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -42,13 +42,17 @@
}, },
"scripts": { "scripts": {
"build-fixtures": "node ./scripts/build-fixtures", "build-fixtures": "node ./scripts/build-fixtures",
"test": "npm run lint && npm run build-fixtures && jest test/", "test": "npm run lint && npm run build-fixtures && jest test/ --coverage",
"test:unit": "jest", "test:unit": "jest",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", "coverage": "codecov",
"lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/", "lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/",
"precommit": "npm run lint", "precommit": "npm run lint",
"postinstall": "opencollective postinstall || exit 0" "postinstall": "opencollective postinstall || exit 0"
}, },
"jest": {
"coverageDirectory": "./coverage/",
"collectCoverage": true
},
"engines": { "engines": {
"node": ">=8.0.0", "node": ">=8.0.0",
"npm": ">=5.0.0" "npm": ">=5.0.0"