diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index e9b172c9..92c00265 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,5 +13,4 @@ jobs: uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: os: 'ubuntu-latest, macos-latest, windows-latest' - version: '14.19.3, 14, 16, 18, 20, 21' - install: 'npx npminstall' + version: '14.19.3, 14, 16, 18, 20, 22' diff --git a/test/index.test.ts b/test/index.test.ts index 4a128179..90a677c0 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -32,7 +32,7 @@ describe('index.test.ts', () => { assert.equal(response.url, `${_url}html`); assert(!response.redirected); assert.equal(getDefaultHttpClient(), getDefaultHttpClient()); - console.log('stats %o', getDefaultHttpClient().getDispatcherPoolStats()); + // console.log('stats %o', getDefaultHttpClient().getDispatcherPoolStats()); }); }); @@ -76,7 +76,7 @@ describe('index.test.ts', () => { dataType: 'json', }); assert.equal(response.status, 200); - console.log(response.data.hello); + // console.log(response.data.hello); }); it('should curl alias to request', async () => { diff --git a/test/keep-alive-header.test.ts b/test/keep-alive-header.test.ts index 61e2f8c9..3d797062 100644 --- a/test/keep-alive-header.test.ts +++ b/test/keep-alive-header.test.ts @@ -31,7 +31,7 @@ describe('keep-alive-header.test.ts', () => { count++; try { const task = httpClient.request(_url); - console.log('after request stats: %o', httpClient.getDispatcherPoolStats()); + // console.log('after request stats: %o', httpClient.getDispatcherPoolStats()); if (httpClient.getDispatcherPoolStats()[origin]) { if (!(nodeMajorVersion() === 14 || isWindows())) { // ignore node = 14 & windows @@ -40,7 +40,7 @@ describe('keep-alive-header.test.ts', () => { } } let response = await task; - console.log('after response stats: %o', httpClient.getDispatcherPoolStats()); + // console.log('after response stats: %o', httpClient.getDispatcherPoolStats()); assert.equal(httpClient.getDispatcherPoolStats()[origin].pending, 0); assert.equal(httpClient.getDispatcherPoolStats()[origin].connected, 1); // console.log(response.res.socket); @@ -129,12 +129,12 @@ describe('keep-alive-header.test.ts', () => { assert.equal(response.headers.connection, 'keep-alive'); assert.equal(response.headers['keep-alive'], 'timeout=2'); assert(parseInt(response.headers['x-requests-persocket'] as string) > 1); - console.log('before sleep stats: %o', httpClient.getDispatcherPoolStats()); + // console.log('before sleep stats: %o', httpClient.getDispatcherPoolStats()); // { connected: 2, free: 1, pending: 0, queued: 0, running: 0, size: 0 } assert.equal(httpClient.getDispatcherPoolStats()[origin].connected, 2); assert.equal(httpClient.getDispatcherPoolStats()[origin].free, 1); await sleep(keepAliveTimeout); - console.log('after sleep stats: %o', httpClient.getDispatcherPoolStats()); + // console.log('after sleep stats: %o', httpClient.getDispatcherPoolStats()); // clients maybe all gone => after sleep stats: {} // { connected: 0, free: 0, pending: 0, queued: 0, running: 0, size: 0 } // { connected: 1, free: 1, pending: 0, queued: 0, running: 0, size: 0 }