Skip to content

Commit 1fbb696

Browse files
authored
test: update test command and add coverage command (#67)
* test: update test command to be test and coverage Signed-off-by: Tierney Cyren <[email protected]> * ci: add test and coverage GitHub Actions Signed-off-by: Tierney Cyren <[email protected]> --------- Signed-off-by: Tierney Cyren <[email protected]>
1 parent 8cc2cbb commit 1fbb696

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Test Suite: Linter"
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
coverage:
12+
if: github.repository == 'twilio-labs/plugin-token'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout the repository
16+
uses: actions/checkout@v4
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: current
21+
- name: Run npm install
22+
run: npm install
23+
- name: Run npm run coverage
24+
run: npm run coverage

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Test Suite: Linter"
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
if: github.repository == 'twilio-labs/plugin-token'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout the repository
16+
uses: actions/checkout@v4
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: current
21+
- name: Run npm install
22+
run: npm install
23+
- name: Run npm run test
24+
run: npm run test

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
"biome:format:write": "npx @biomejs/biome format --write .",
6060
"biome:lint": "npx @biomejs/biome lint .",
6161
"biome:lint:write": "npx @biomejs/biome lint --write .",
62+
"coverage": "nyc --check-coverage --lines 90 --reporter=html --reporter=text mocha --forbid-only \"test/**/*.test.js\"",
6263
"postpack": "rm -f oclif.manifest.json",
63-
"posttest": "eslint --ignore-path .gitignore . && npm audit",
6464
"prepack": "oclif-dev manifest && oclif-dev readme",
65-
"test": "nyc --check-coverage --lines 90 --reporter=html --reporter=text mocha --forbid-only \"test/**/*.test.js\""
65+
"test": "mocha --forbid-only \"test/**/*.test.js\""
6666
}
6767
}

0 commit comments

Comments
 (0)