Skip to content

Commit

Permalink
ci: re-enable testing in Node.js 12 (nodejs#1646)
Browse files Browse the repository at this point in the history
* ci: re-enable testing in Node.js 12

* ci: bump codecov version

* test: disable failing test in node@v12

* test: disable testing in Jest in Node < 14
  • Loading branch information
dominykas authored and crysmags committed Feb 27, 2024
1 parent b07fb89 commit 0568498
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
test-command: npm run coverage:ci
post-test-steps: |
- name: Coverage Report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
include: |
- runs-on: ubuntu-latest
node-version: 16.8
exclude: |
- runs-on: windows-latest
node-version: 16
- node-version: 12
automerge:
if: >
github.event_name == 'pull_request' &&
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"test": "npm run test:tap && npm run test:node-fetch && npm run test:fetch && npm run test:jest && tsd",
"test:node-fetch": "node scripts/verifyVersion.js 16 || mocha test/node-fetch",
"test:fetch": "node scripts/verifyVersion.js 16 || (npm run build:node && tap test/fetch/*.js && tap test/webidl/*.js)",
"test:jest": "jest",
"test:jest": "node scripts/verifyVersion.js 14 || jest",
"test:tap": "tap test/*.js test/diagnostics-channel/*.js",
"test:tdd": "tap test/*.js test/diagnostics-channel/*.js -w",
"test:typescript": "tsd",
Expand Down
4 changes: 3 additions & 1 deletion test/request-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const {
PassThrough
} = require('stream')

const nodeMajor = Number(process.versions.node.split('.')[0])

test('request timeout', (t) => {
t.plan(1)

Expand Down Expand Up @@ -55,7 +57,7 @@ test('request timeout with readable body', (t) => {
t.type(err, errors.HeadersTimeoutError)
})
})
})
}, { skip: nodeMajor < 14 })

test('body timeout', (t) => {
t.plan(2)
Expand Down

0 comments on commit 0568498

Please sign in to comment.