Skip to content

Commit

Permalink
Make it work on node18, fix node19 separately
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Nov 29, 2022
1 parent 333da67 commit eabcb09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [14, 16, 18, 19]
node-version: [14, 16, 18]
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand Down
11 changes: 9 additions & 2 deletions test/index.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,16 @@ test('explicit cert and ca', async t => {
})
s.listen()
await pEvent(s, 'listening')
const cli = connect(s.port)
// Extra steps to ensure node 18 doesn't deadlock.
let res = null
const connected = new Promise(resolve => {
res = resolve
})
const cli = connect(s.port, res)
await connected
const close = pEvent(cli, 'close')
cli.end()
await pEvent(cli, 'close')
await close
s.close()
t.pass()
})

0 comments on commit eabcb09

Please sign in to comment.