Skip to content

feat: use AsyncLocalStorage to store request state #1340

feat: use AsyncLocalStorage to store request state

feat: use AsyncLocalStorage to store request state #1340

Triggered via pull request December 5, 2024 06:23
Status Failure
Total duration 4m 15s
Artifacts

nodejs.yml

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

Annotations

150 errors and 36 warnings
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`: 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/options.followRedirect.test.ts > options.followRedirect.test.ts > should httpClient.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L129
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:129: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:61139/redirect-full-301-to-url' Expected: "http://localhost:61139/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50: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#L742
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:742:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:644:18 ❯ HttpClient.request src/HttpClient.ts:250: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': '64270', '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 06:24:31 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 1, localAddress: '127.0.0.1', localPort: 64270, remoteAddress: '127.0.0.1', remotePort: 64269, remoteFamily: 'IPv4', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:31.331Z', lastRequestEndTime: '2024-12-05T06:24:31.376Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '64270', '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 06:24:31 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5477.167, keepAliveSocket: true, requestUrls: [ 'http://localhost:64269/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: 0.15, dnslookup: 0.119, connected: +0, requestHeadersSent: 0.193, requestSent: 0.258, waiting: +0, contentDownload: +0 }, socket: { id: 1, localAddress: '127.0.0.1', localPort: 64270, remoteAddress: '127.0.0.1', remotePort: 64269, remoteFamily: 'IPv4', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:31.331Z', lastRequestEndTime: '2024-12-05T06:24:31.376Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 64277, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T06:24:31.382Z' } } 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/options.followRedirect.test.ts > options.followRedirect.test.ts > should httpClient.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L129
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:129: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:64269/redirect-full-301-to-url' Expected: "http://localhost:64269/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50: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`: src/HttpClient.ts#L742
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:742:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:644:18 ❯ HttpClient.request src/HttpClient.ts:250: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': '60800', '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/22.12.0 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 06:24:37 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 1, localAddress: '::1', localPort: 60800, remoteAddress: '::1', remotePort: 60799, remoteFamily: 'IPv6', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:37.358Z', lastRequestEndTime: '2024-12-05T06:24:37.410Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '60800', '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/22.12.0 (win32; x64)"}', location: 'http://localhost/redirect-full-to-url', date: 'Thu, 05 Dec 2024 06:24:37 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5473.896, keepAliveSocket: true, requestUrls: [ 'http://localhost:60799/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: 0.122, dnslookup: 0.089, connected: +0, requestHeadersSent: 0.17, requestSent: 0.22, waiting: +0, contentDownload: +0 }, socket: { id: 1, localAddress: '::1', localPort: 60800, remoteAddress: '::1', remotePort: 60799, remoteFamily: 'IPv6', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:37.358Z', lastRequestEndTime: '2024-12-05T06:24:37.410Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 60804, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T06:24:37.416Z' } } 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/options.followRedirect.test.ts > options.followRedirect.test.ts > should httpClient.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L129
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:129: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:60799/redirect-full-301-to-url' Expected: "http://localhost:60799/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L47
AssertionError: false == true - Expected + Received - true + false ❯ test/options.timing.test.ts:47: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#L742
HttpClientRequestTimeoutError: Request timeout for 5000 ms ❯ HttpClient.#requestInternal src/HttpClient.ts:742:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:644:18 ❯ HttpClient.request src/HttpClient.ts:250: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': '59226', '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 06:24:41 GMT', connection: 'keep-alive', 'content-length': '49' }, socket: { id: 1, localAddress: '127.0.0.1', localPort: 59226, remoteAddress: '127.0.0.1', remotePort: 59225, remoteFamily: 'IPv4', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:41.153Z', lastRequestEndTime: '2024-12-05T06:24:41.195Z' }, res: { status: 302, statusCode: 302, statusText: 'Found', statusMessage: 'Found', headers: { 'keep-alive': 'timeout=5', 'x-requests-persocket': '9', 'x-requests-socket-port': '59226', '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 06:24:41 GMT', connection: 'keep-alive', 'content-length': '49' }, size: 49, aborted: false, rt: 5471.411, keepAliveSocket: true, requestUrls: [ 'http://localhost:59225/redirect-full', 'http://localhost/redirect-full-to-url' ], timing: { queuing: 0.104, dnslookup: 0.08, connected: +0, requestHeadersSent: 0.129, requestSent: 0.168, waiting: +0, contentDownload: +0 }, socket: { id: 1, localAddress: '127.0.0.1', localPort: 59226, remoteAddress: '127.0.0.1', remotePort: 59225, remoteFamily: 'IPv4', bytesWritten: 1229, bytesRead: 4017, handledRequests: 9, handledResponses: 9, connectedTime: '2024-12-05T06:24:41.153Z', lastRequestEndTime: '2024-12-05T06:24:41.195Z' }, retries: +0, socketErrorRetries: +0 }, opaque: undefined, _rawSocket: { id: 5, localAddress: '::1', localPort: 59230, remoteAddress: '::1', remotePort: 80, remoteFamily: 'IPv6', bytesWritten: 141, bytesRead: +0, handledRequests: 1, handledResponses: +0, connectedTime: '2024-12-05T06:24:41.200Z' } } 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/options.followRedirect.test.ts > options.followRedirect.test.ts > should httpClient.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L129
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:129: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:59225/redirect-full-301-to-url' Expected: "http://localhost:59225/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50: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/options.followRedirect.test.ts > options.followRedirect.test.ts > should httpClient.redirect `location: /redirect-full-301-to-url`: test/options.followRedirect.test.ts#L129
AssertionError: Expected values to be strictly equal: 404 !== 200 - Expected + Received - 200 + 404 ❯ test/options.followRedirect.test.ts:129: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:50191/redirect-full-301-to-url' Expected: "http://localhost:50191/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L47
AssertionError: false == true - Expected + Received - true + false ❯ test/options.timing.test.ts:47: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:35401/redirect-full-301-to-url' Expected: "http://localhost:35401/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.159 !== 0 - Expected + Received - 0 + 0.159 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (ubuntu-latest, 18)
Process completed with exit code 1.
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:49381/redirect-full-301-to-url' Expected: "http://localhost:49381/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.085 !== 0 - Expected + Received - 0 + 0.085 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (macos-latest, 18.19.0)
Process completed with exit code 1.
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:42753/redirect-full-301-to-url' Expected: "http://localhost:42753/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.135 !== 0 - Expected + Received - 0 + 0.135 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (ubuntu-latest, 22)
Process completed with exit code 1.
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:41237/redirect-full-301-to-url' Expected: "http://localhost:41237/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.159 !== 0 - Expected + Received - 0 + 0.159 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (ubuntu-latest, 20)
Process completed with exit code 1.
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:42227/redirect-full-301-to-url' Expected: "http://localhost:42227/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.14 !== 0 - Expected + Received - 0 + 0.14 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (ubuntu-latest, 23)
Process completed with exit code 1.
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:44799/redirect-full-301-to-url' Expected: "http://localhost:44799/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.158 !== 0 - Expected + Received - 0 + 0.158 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (ubuntu-latest, 18.19.0)
Process completed with exit code 1.
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:49260/redirect-full-301-to-url' Expected: "http://localhost:49260/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.135 !== 0 - Expected + Received - 0 + 0.135 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (macos-latest, 22)
Process completed with exit code 1.
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:49254/redirect-full-301-to-url' Expected: "http://localhost:49254/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.09 !== 0 - Expected + Received - 0 + 0.09 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (macos-latest, 20)
Process completed with exit code 1.
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:49254/redirect-full-301-to-url' Expected: "http://localhost:49254/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.083 !== 0 - Expected + Received - 0 + 0.083 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (macos-latest, 18)
Process completed with exit code 1.
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:49257/redirect-full-301-to-url' Expected: "http://localhost:49257/redirect-full-301-to-url" Received: "http://localhost/redirect-full-301-to-url" ❯ test/options.followRedirect.test.ts:148:12
test/options.timing.test.ts > options.timing.test.ts > should timing = true work: test/options.timing.test.ts#L50
AssertionError: The expression evaluated to a falsy value: assert(res.timing.queuing > 0) - Expected + Received - true + false ❯ test/options.timing.test.ts:50:5
test/options.timing.test.ts > options.timing.test.ts > should timing = false work: test/options.timing.test.ts#L67
AssertionError: Expected values to be strictly equal: 0.083 !== 0 - Expected + Received - 0 + 0.083 ❯ test/options.timing.test.ts:67:12
test/options.timing.test.ts > options.timing.test.ts > should timing default to true: test/options.timing.test.ts#L79
AssertionError: The expression evaluated to a falsy value: assert.equal(response.status, 200) - Expected + Received - true + false ❯ test/options.timing.test.ts:79:5
Node.js / Test (macos-latest, 23)
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, 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, 22)
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, 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, 18.19.0)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636