Skip to content

Commit f7f6577

Browse files
committed
add unit test script to package.json + fix it in github actions
1 parent 91ca001 commit f7f6577

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
- name: Type check
3030
run: npm run type-check
3131

32-
- name: Run Jest tests
33-
run: npm run test:jest
32+
- name: Run Unit tests
33+
run: npm run test:ci
3434

3535
deploy:
3636
needs: test

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
- name: Type check
3232
run: npm run type-check
3333

34-
- name: Run Jest tests
35-
run: npm run test:jest
34+
- name: Run tests
35+
run: npm run test:ci

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build:prod": "ng build --configuration production",
1010
"watch": "ng build --watch --configuration development",
1111
"test": "ng test",
12-
"test:coverage": "ng test --code-coverage",
12+
"test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless",
13+
"test:coverage": "ng test --no-watch --no-progress --browsers=ChromeHeadless --code-coverage",
1314
"lint": "npm run format:check",
1415
"lint:fix": "npm run format",
1516
"format": "prettier --write \"src/**/*.{ts,html,scss,json}\"",

0 commit comments

Comments
 (0)