mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-26 17:09:09 +00:00
Merge pull request #111 from cse110-fa22-group29/try-nyc
Implement c8 Code Coverage Testing
This commit is contained in:
commit
2640b10a2d
8
.github/workflows/js-unittest.yml
vendored
8
.github/workflows/js-unittest.yml
vendored
@ -22,8 +22,8 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo npm install
|
run: npm install
|
||||||
- name: Start local http server
|
- name: Start local http server
|
||||||
run: sudo npm run http-server &
|
run: npm run http-server &
|
||||||
- name: Run tests
|
- name: Run tests with coverage
|
||||||
run: sudo npm test
|
run: npm run coverage
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
**/.devcontainer/*
|
**/.devcontainer/*
|
||||||
**/node_modules/*
|
**/node_modules/*
|
||||||
**/package-lock.json
|
**/package-lock.json
|
||||||
**/*.vscode/*
|
**/.vscode/*
|
||||||
|
**/.nyc_output/*
|
||||||
|
**/coverage/*
|
@ -4,6 +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 --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",
|
||||||
@ -15,6 +16,7 @@
|
|||||||
"js-doc": "jsdoc -d source/docs/ -r source/"
|
"js-doc": "jsdoc -d source/docs/ -r source/"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"c8": "^7.12.0",
|
||||||
"eslint": "^8.27.0",
|
"eslint": "^8.27.0",
|
||||||
"htmlhint": "1.1.4",
|
"htmlhint": "1.1.4",
|
||||||
"http-server": "",
|
"http-server": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user