diff --git a/.github/workflows/js-test-and-release.yml b/.github/workflows/js-test-and-release.yml index ed173493d9..c6897e3b53 100644 --- a/.github/workflows/js-test-and-release.yml +++ b/.github/workflows/js-test-and-release.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - node: [16] + node: [lts/*] fail-fast: true steps: - uses: actions/checkout@v3 diff --git a/test/max-connections.spec.ts b/test/max-connections.spec.ts index 19f4bbf6c1..24551a0a8b 100644 --- a/test/max-connections.spec.ts +++ b/test/max-connections.spec.ts @@ -18,10 +18,10 @@ describe('maxConnections', () => { const port = 9900 const seenRemoteConnections = new Set() - const trasnport = tcp({ maxConnections })() + const transport = tcp({ maxConnections })() const upgrader = mockUpgrader() - const listener = trasnport.createListener({ upgrader }) + const listener = transport.createListener({ upgrader }) // eslint-disable-next-line @typescript-eslint/promise-function-async afterEachCallbacks.push(() => listener.close()) await listener.listen(multiaddr(`/ip4/127.0.0.1/tcp/${port}`)) @@ -33,7 +33,7 @@ describe('maxConnections', () => { const sockets: net.Socket[] = [] for (let i = 0; i < socketCount; i++) { - const socket = net.connect({ port }) + const socket = net.connect({ host: '127.0.0.1', port }) sockets.push(socket) // eslint-disable-next-line @typescript-eslint/promise-function-async