Update: simplify npm command to run tests

This commit is contained in:
Kevin Dang
2025-05-08 21:16:32 -07:00
parent a5faca87aa
commit 5820583609
3 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ jobs:
- name: Collect Code Coverage - name: Collect Code Coverage
run: | run: |
LINE_PCT=$(npm run test:coverage | tail -2 | head -1 | awk '{print $3}') LINE_PCT=$(npm run coverage | tail -2 | head -1 | awk '{print $3}')
echo "COVERAGE=$LINE_PCT" >> $GITHUB_ENV echo "COVERAGE=$LINE_PCT" >> $GITHUB_ENV
- name: Upload Code Coverage - name: Upload Code Coverage

View File

@@ -47,4 +47,4 @@ jobs:
- name: Test Application - name: Test Application
run: | run: |
npm run test:run npm run tests

View File

@@ -5,8 +5,8 @@
"main": "build/index.js", "main": "build/index.js",
"exports": "./build/index.js", "exports": "./build/index.js",
"scripts": { "scripts": {
"test:run": "vitest run", "tests": "vitest run",
"test:coverage": "vitest run --coverage", "coverage": "vitest run --coverage",
"watch": "tsx watch src", "watch": "tsx watch src",
"build": "tsc", "build": "tsc",
"prod": "node .", "prod": "node .",