Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: re-enable testing in Node.js 12 #1646

Merged
merged 4 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jest@29+, used here, does not support Node.js 12...

"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 })
Copy link
Member Author

@dominykas dominykas Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As suggested by Matteo: #1645 (comment)

Although I wonder if there's a way to feature detect writableNeedDrain? I'm not familiar with Node's internals, but it seems I could not find a way to see if the getter for it is declared or not?


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