mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-26 00:49:10 +00:00
add coverage check, try permision fix
This commit is contained in:
parent
35c8619f87
commit
08bd1dc3ba
2
.github/workflows/js-unittest.yml
vendored
2
.github/workflows/js-unittest.yml
vendored
@ -23,6 +23,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo npm install
|
run: sudo npm install
|
||||||
|
- name: Give permissions to npm folder
|
||||||
|
run: sudo chown -R 1001:123 "/root/.npm"
|
||||||
- name: Start local http server
|
- name: Start local http server
|
||||||
run: sudo npm run http-server &
|
run: sudo npm run http-server &
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha --recursive --require mock-local-storage './{,!(node_modules)/**}/*.test.js'",
|
"test": "mocha --recursive --require mock-local-storage './{,!(node_modules)/**}/*.test.js'",
|
||||||
"coverage": "c8 npm run test",
|
"coverage": "c8 --check-coverage --lines 90 --functions 90 --branches 90 npm run test",
|
||||||
"lint-js": "eslint **/*.js",
|
"lint-js": "eslint **/*.js",
|
||||||
"fix-js": "eslint --fix **/*.js",
|
"fix-js": "eslint --fix **/*.js",
|
||||||
"lint-html": "htmlhint **/*.html",
|
"lint-html": "htmlhint **/*.html",
|
||||||
|
Loading…
Reference in New Issue
Block a user