Skip to content

Commit

Permalink
Fix the test in Node 21
Browse files Browse the repository at this point in the history
  • Loading branch information
w3nl committed Oct 20, 2023
1 parent b6f1958 commit 32f0915
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test-node21.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Node Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: npm test
run: |
npm ci
npm run test:node21
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint src/*.js --config .eslintrc",
"lint:report": "eslint src/*.js --config .eslintrc -f json -o report.json",
"lint:fix": "eslint src/*.js --config .eslintrc --fix",
"test": "c8 node --test src/**/*.js",
"test": "c8 node --test src/",
"test:node21": "c8 node --test 'src/**/*.js'",
"cpd": "node_modules/jscpd/bin/jscpd src",
"vulnerabilities": "npm audit --omit=dev"
},
Expand Down

0 comments on commit 32f0915

Please sign in to comment.