docs(readme): json usage #151
Annotations
11 errors and 1 warning
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L7
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.get ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:7:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'GET', url: 'http://localhost:8091/api/get-text', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L13
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.get ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:13:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'GET', url: 'http://localhost:8091/api/get-json', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L21
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.get ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:21:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, headers: { foo: 'bar', 'foo-baz': 'baz', accept: '*/*' }, method: 'GET', url: 'http://localhost:8091/api/get-return-headers', responseType: 'text' }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L35
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.get ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:35:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'GET', url: 'http://localhost:8091/api/get-set-cookie', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L41
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.get ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:41:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'GET', url: 'http://localhost:8091/api/get-headers', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L47
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.post ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:47:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'POST', url: 'http://localhost:8091/api/post-text', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L53
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.post ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:53:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, method: 'POST', url: 'http://localhost:8091/api/post-json', responseType: 'text', headers: { accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L61
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.post ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:61:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, headers: { foo: 'bar', 'foo-baz': 'baz', accept: '*/*' }, method: 'POST', url: 'http://localhost:8091/api/post-return-headers', responseType: 'text' }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L75
LylaError[NETWORK]: Network error
❯ createLylaError ../core/lib/error.js:62:23
❯ defineLylaError ../core/lib/error.js:67:23
❯ onNetworkError ../core/lib/core.js:271:66
❯ onNetworkError ../universal/lib/instance.js:73:24
❯ ClientRequest.<anonymous> ../node/lib/adapter.js:112:9
❯ ClientRequest.emit node:events:513:28
❯ Socket.socketErrorListener node:_http_client:494:9
❯ Socket.emit node:events:513:28
❯ request ../core/lib/core.js:93:27
❯ AsyncFunction.post ../core/lib/core.js:466:20
❯ node-tests/node-universal.spec.ts:75:29
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { __lylaError: true, detail: { anyhow: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' }, web: undefined, node: { stack: 'Error: connect ECONNREFUSED 127.0.0.1:8091\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)', message: 'connect ECONNREFUSED 127.0.0.1:8091', errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8091, constructor: 'Function<Error>', name: 'Error', toString: 'Function<toString>' } }, error: undefined, response: undefined, context: undefined, requestOptions: { context: undefined, json: { foo: 'bar' }, method: 'POST', url: 'http://localhost:8091/api/post-return-body', responseType: 'text', body: '{"foo":"bar"}', headers: { 'content-type': 'application/json', accept: '*/*' } }, spread: 'Function<spread>' }
|
Run pnpm run test:
packages/test/node-tests/node-universal.spec.ts#L92
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ node-tests/node-universal.spec.ts:92:44
|
|
Loading