mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-25 16:39: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
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: sudo npm install
|
||||
run: npm install
|
||||
- name: Start local http server
|
||||
run: sudo npm run http-server &
|
||||
- name: Run tests
|
||||
run: sudo npm test
|
||||
run: npm run http-server &
|
||||
- name: Run tests with coverage
|
||||
run: npm run coverage
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
**/.devcontainer/*
|
||||
**/node_modules/*
|
||||
**/package-lock.json
|
||||
**/*.vscode/*
|
||||
**/.vscode/*
|
||||
**/.nyc_output/*
|
||||
**/coverage/*
|
@ -4,6 +4,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"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",
|
||||
"fix-js": "eslint --fix **/*.js",
|
||||
"lint-html": "htmlhint **/*.html",
|
||||
@ -15,6 +16,7 @@
|
||||
"js-doc": "jsdoc -d source/docs/ -r source/"
|
||||
},
|
||||
"devDependencies": {
|
||||
"c8": "^7.12.0",
|
||||
"eslint": "^8.27.0",
|
||||
"htmlhint": "1.1.4",
|
||||
"http-server": "",
|
||||
|
Loading…
Reference in New Issue
Block a user