Skip to content

Commit dcd4e81

Browse files
authored
ci: re-enable testing in Node.js 12 (nodejs#1646)
* 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
1 parent c3fddc3 commit dcd4e81

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ jobs:
1616
test-command: npm run coverage:ci
1717
post-test-steps: |
1818
- name: Coverage Report
19-
uses: codecov/codecov-action@v2
19+
uses: codecov/codecov-action@v3
2020
include: |
2121
- runs-on: ubuntu-latest
2222
node-version: 16.8
2323
exclude: |
2424
- runs-on: windows-latest
2525
node-version: 16
26-
- node-version: 12
2726
automerge:
2827
if: >
2928
github.event_name == 'pull_request' &&

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"test": "npm run test:tap && npm run test:node-fetch && npm run test:fetch && npm run test:jest && tsd",
5050
"test:node-fetch": "node scripts/verifyVersion.js 16 || mocha test/node-fetch",
5151
"test:fetch": "node scripts/verifyVersion.js 16 || (npm run build:node && tap test/fetch/*.js && tap test/webidl/*.js)",
52-
"test:jest": "jest",
52+
"test:jest": "node scripts/verifyVersion.js 14 || jest",
5353
"test:tap": "tap test/*.js test/diagnostics-channel/*.js",
5454
"test:tdd": "tap test/*.js test/diagnostics-channel/*.js -w",
5555
"test:typescript": "tsd",

test/request-timeout.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const {
1515
PassThrough
1616
} = require('stream')
1717

18+
const nodeMajor = Number(process.versions.node.split('.')[0])
19+
1820
test('request timeout', (t) => {
1921
t.plan(1)
2022

@@ -55,7 +57,7 @@ test('request timeout with readable body', (t) => {
5557
t.type(err, errors.HeadersTimeoutError)
5658
})
5759
})
58-
})
60+
}, { skip: nodeMajor < 14 })
5961

6062
test('body timeout', (t) => {
6163
t.plan(2)

0 commit comments

Comments
 (0)