Skip to content

feat: use AsyncLocalStorage to store request state #1344

feat: use AsyncLocalStorage to store request state

feat: use AsyncLocalStorage to store request state #1344

Triggered via pull request December 5, 2024 14:48
Status Failure
Total duration 4m 32s
Artifacts

nodejs.yml

on: pull_request
Matrix: Node.js / Test
Fit to window
Zoom out
Zoom in

Annotations

150 errors and 66 warnings
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/22.12.0 (win32; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/22.12.0 (win32; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should redirect `location: /redirect-full-to-url`: test/options.followRedirect.test.ts#L101
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:101:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should urllib.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L114
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:114:12
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/23.3.0 (win32; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/23.3.0 (win32; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should redirect `location: /redirect-full-to-url`: test/options.followRedirect.test.ts#L101
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:101:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should urllib.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L114
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:114:12
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (win32; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.19.0 (win32; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should redirect `location: /redirect-full-to-url`: src/HttpClient.ts#L746
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:746:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:647:18 ❯ src/HttpClient.ts:256:14 ❯ HttpClient.request src/HttpClient.ts:255:12 ❯ Object.request src/index.ts:31:10 ❯ test/options.followRedirect.test.ts:97:57 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { status: 302, headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '62084', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:49:48 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 5, localAddress: '::1', localPort: 62088, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:48.447Z', lastRequestEndTime: '2024-12-05T14:49:53.932Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '62084', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:49:48 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5486.771, keepAliveSocket: true, requestUrls: [ 'http://localhost:62083/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: +0, dnslookup: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: 5, localAddress: '::1', localPort: 62088, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:48.447Z', lastRequestEndTime: '2024-12-05T14:49:53.932Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 62088, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:48.447Z' } } Caused by: Caused by: HeadersTimeoutError: Headers Timeout Error ❯ FastTimer.onParserTimeout [as _onTimeout] node_modules/undici/lib/dispatcher/client-h1.js:751:28 ❯ Timeout.onTick [as _onTimeout] node_modules/undici/lib/util/timers.js:162:13 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_HEADERS_TIMEOUT' }
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should urllib.redirect `location: /redirect-full-301-to-url`: src/HttpClient.ts#L746
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:746:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:647:18 ❯ src/HttpClient.ts:256:14 ❯ HttpClient.request src/HttpClient.ts:255:12 ❯ Object.request src/index.ts:31:10 ❯ test/options.followRedirect.test.ts:110:57 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { status: 301, headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '1', 'x-requests-socket-port': '62111', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full-301', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (win32; x64)"}', location: 'http://localhost/redirect-full-301-to-url', date: 'Thu, 05 Dec 2024 14:49:53 GMT', connection: 'keep-alive', 'content-length': '53' }, socket: { id: 7, localAddress: '::1', localPort: 62112, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 145, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:53.946Z', lastRequestEndTime: '2024-12-05T14:49:59.459Z' }, res: { status: 301, statusCode: 301, statusText: 'Moved Permanently', statusMessage: 'Moved Permanently', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '1', 'x-requests-socket-port': '62111', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full-301', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (win32; x64)"}', location: 'http://localhost/redirect-full-301-to-url', date: 'Thu, 05 Dec 2024 14:49:53 GMT', connection: 'keep-alive', 'content-length': '53' }, size: 53, aborted: false, rt: 5515.51, keepAliveSocket: true, requestUrls: [ 'http://localhost:62083/redirect-full-301', 'http://localhost/redirect-full-301-to-url' ], timing: { queuing: +0, dnslookup: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: 7, localAddress: '::1', localPort: 62112, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 145, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:53.946Z', lastRequestEndTime: '2024-12-05T14:49:59.459Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 7, localAddress: '::1', localPort: 62112, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 145, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:53.946Z' } } Caused by: Caused by: HeadersTimeoutError: Headers Timeout Error ❯ FastTimer.onParserTimeout [as _onTimeout] node_modules/undici/lib/dispatcher/client-h1.js:751:28 ❯ Timeout.onTick [as _onTimeout] node_modules/undici/lib/util/timers.js:162:13 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_HEADERS_TIMEOUT' }
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.20.5 (win32; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.20.5 (win32; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should redirect `location: /redirect-full-to-url`: src/HttpClient.ts#L746
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:746:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:647:18 ❯ src/HttpClient.ts:256:14 ❯ HttpClient.request src/HttpClient.ts:255:12 ❯ Object.request src/index.ts:31:10 ❯ test/options.followRedirect.test.ts:97:57 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { status: 302, headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '56240', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.20.5 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:49:55 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 5, localAddress: '::1', localPort: 56244, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:55.507Z', lastRequestEndTime: '2024-12-05T14:50:00.972Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '56240', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.20.5 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:49:55 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5467.011, keepAliveSocket: true, requestUrls: [ 'http://localhost:56239/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: +0, dnslookup: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: 5, localAddress: '::1', localPort: 56244, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:55.507Z', lastRequestEndTime: '2024-12-05T14:50:00.972Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 56244, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:49:55.507Z' } } Caused by: Caused by: HeadersTimeoutError: Headers Timeout Error ❯ FastTimer.onParserTimeout [as _onTimeout] node_modules/undici/lib/dispatcher/client-h1.js:751:28 ❯ Timeout.onTick [as _onTimeout] node_modules/undici/lib/util/timers.js:162:13 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_HEADERS_TIMEOUT' }
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should urllib.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L114
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:114:12
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/20.18.1 (win32; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/20.18.1 (win32; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should redirect `location: /redirect-full-to-url`: src/HttpClient.ts#L746
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:746:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:647:18 ❯ src/HttpClient.ts:256:14 ❯ HttpClient.request src/HttpClient.ts:255:12 ❯ Object.request src/index.ts:31:10 ❯ test/options.followRedirect.test.ts:97:57 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { status: 302, headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '55571', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/20.18.1 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:50:05 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 5, localAddress: '::1', localPort: 55575, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:50:05.630Z', lastRequestEndTime: '2024-12-05T14:50:11.127Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '55571', 'x-foo': 'bar', 'x-href': 'http://localhost/redirect-full', 'x-method': 'GET', 'x-request-headers': '{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/20.18.1 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 14:50:05 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5499.355, keepAliveSocket: true, requestUrls: [ 'http://localhost:55570/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: +0, dnslookup: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: 5, localAddress: '::1', localPort: 55575, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:50:05.630Z', lastRequestEndTime: '2024-12-05T14:50:11.127Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 55575, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T14:50:05.630Z' } } Caused by: Caused by: HeadersTimeoutError: Headers Timeout Error ❯ FastTimer.onParserTimeout [as _onTimeout] node_modules/undici/lib/dispatcher/client-h1.js:751:28 ❯ Timeout.onTick [as _onTimeout] node_modules/undici/lib/util/timers.js:162:13 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_HEADERS_TIMEOUT' }
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should urllib.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L114
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:114:12
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/20.18.1 (linux; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/20.18.1 (linux; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:36977/redirect-full-301-to-url' Expected: "http://localhost:36977/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (ubuntu-latest, 20)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (linux; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.19.0 (linux; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:41841/redirect-full-301-to-url' Expected: "http://localhost:41841/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (ubuntu-latest, 18.19.0)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.20.5 (linux; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.20.5 (linux; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:34995/redirect-full-301-to-url' Expected: "http://localhost:34995/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (ubuntu-latest, 18)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/23.3.0 (linux; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/23.3.0 (linux; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:44245/redirect-full-301-to-url' Expected: "http://localhost:44245/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (ubuntu-latest, 23)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.19.0 (darwin; arm64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.19.0 (darwin; arm64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:49365/redirect-full-301-to-url' Expected: "http://localhost:49365/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (macos-latest, 18.19.0)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/22.12.0 (linux; x64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/22.12.0 (linux; x64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:38495/redirect-full-301-to-url' Expected: "http://localhost:38495/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (ubuntu-latest, 22)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/20.18.1 (darwin; arm64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/20.18.1 (darwin; arm64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:49253/redirect-full-301-to-url' Expected: "http://localhost:49253/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (macos-latest, 20)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/23.3.0 (darwin; arm64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/23.3.0 (darwin; arm64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:49255/redirect-full-301-to-url' Expected: "http://localhost:49255/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (macos-latest, 23)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/18.20.5 (darwin; arm64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/18.20.5 (darwin; arm64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:49252/redirect-full-301-to-url' Expected: "http://localhost:49252/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (macos-latest, 18)
Process completed with exit code 1.
test/fetch.test.ts > fetch.test.ts > fetch should work: test/fetch.test.ts#L49
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:49:5
test/fetch.test.ts > fetch.test.ts > fetch error should has socket info: test/fetch.test.ts#L91
AssertionError: false == true - Expected + Received - true + false ❯ test/fetch.test.ts:91:5
test/index.test.ts > index.test.ts > urllib.request() > should response set-cookie as an array string: test/index.test.ts#L64
AssertionError: The expression evaluated to a falsy value: it('should response set-cookie as an array string', async () => { const response = await urllib.request(`${_url}set-two-cookie`); assert.equal(response.status, 200); assert(Array.isArray(response.headers['set-cookie'])); assert.equal(typeof response.headers['set-cookie'], 'object'); assert.deepEqual(response.headers['set-cookie'], [ 'foo=bar; path=/', 'hello=world; path=/', ]); assert.equal(response.headers['Set-Cookie'], undefined); }) - Expected + Received - true + false ❯ test/index.test.ts:64:7
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work: test/index.test.ts#L237
AssertionError: Expected values to be strictly equal: 200 !== 400 - Expected + Received - 400 + 200 ❯ test/index.test.ts:237:14
test/index.test.ts > index.test.ts > Mocking request > should mocking intercept work with readable: test/index.test.ts#L284
AssertionError: The input did not match the regular expression /mock response stream/. Input: '{"method":"GET","url":"/foo.js","href":"http://localhost/foo.js","headers":{"host":"localhost","connection":"keep-alive","user-agent":"node-urllib/VERSION Node.js/22.12.0 (darwin; arm64)"},"requestBody":""}' - Expected: /mock response stream/ + Received: "{\"method\":\"GET\",\"url\":\"/foo.js\",\"href\":\"http://localhost/foo.js\",\"headers\":{\"host\":\"localhost\",\"connection\":\"keep-alive\",\"user-agent\":\"node-urllib/VERSION Node.js/22.12.0 (darwin; arm64)\"},\"requestBody\":\"\"}" ❯ test/index.test.ts:284:14
test/keep-alive-header.test.ts > keep-alive-header.test.ts > should handle Keep-Alive header and not throw reset error on 1s keepalive agent: test/keep-alive-header.test.ts#L151
TypeError: Cannot read properties of undefined (reading 'connected') ❯ test/keep-alive-header.test.ts:151:60
test/options.digestAuth.test.ts > options.digestAuth.test.ts > should choose one of multiple challenges split in different headers: test/options.digestAuth.test.ts#L36
AssertionError: Expected values to be strictly equal: 401 !== 200 - Expected + Received - 200 + 401 ❯ test/options.digestAuth.test.ts:36:12
test/options.followRedirect.test.ts > options.followRedirect.test.ts > should disable auto redirect: test/options.followRedirect.test.ts#L148
AssertionError: Expected values to be strictly equal: + actual - expected + 'http://localhost/redirect-full-301-to-url' - 'http://localhost:49256/redirect-full-301-to-url' Expected: "http://localhost:49256/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
Node.js / Test (macos-latest, 22)
Process completed with exit code 1.
Node.js / Setup
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Node.js / Test (ubuntu-latest, 20)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Node.js / Test (ubuntu-latest, 18.19.0)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Node.js / Test (ubuntu-latest, 18)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Node.js / Test (ubuntu-latest, 23)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Node.js / Test (ubuntu-latest, 22)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636