fix(WebSocketClientManager): use localStorage for clients persistence #1621
Annotations
4 errors and 2 warnings
src/core/ws/WebSocketClientManager.test.ts > adds a client from this runtime to the list of clients:
src/core/ws/WebSocketClientManager.test.ts#L40
AssertionError: expected "postMessage" to be called with arguments: [ { type: 'connection:open', …(1) } ]
Received:
Number of calls: 0
❯ src/core/ws/WebSocketClientManager.test.ts:40:31
|
src/core/ws/WebSocketClientManager.test.ts > adds a client from another runtime to the list of clients:
src/core/ws/WebSocketClientManager.test.ts#L67
AssertionError: expected [] to deeply equal [ …(1) ]
- Expected
+ Received
- Array [
- WebSocketRemoteClientConnection {
- "channel": BroadcastChannel {
- "postMessage": [Function postMessage],
- Symbol(kEvents): Map {
- "message" => Object {
- "next": Listener {
- "callback": [Function handleExtraneousMessage],
- "flags": 0,
- "listener": [Function handleExtraneousMessage],
- "next": undefined,
- "previous": [Circular],
- },
- "resistStopPropagation": false,
- "size": 1,
- },
- },
- Symbol(events.maxEventTargetListeners): 10,
- Symbol(events.maxEventTargetListenersWarned): false,
- Symbol(kType): "BroadcastChannel",
- Symbol(kName): "test:channel",
- Symbol(kHandle): MessagePort {
- Symbol(kEvents): Map {
- "newListener" => Object {
- "next": Listener {
- "callback": [Function anonymous],
- "flags": 8,
- "listener": [Function anonymous],
- "next": undefined,
- "previous": [Circular],
- },
- "resistStopPropagation": false,
- "size": 1,
- },
- "removeListener" => Object {
- "next": Listener {
- "callback": [Function anonymous],
- "flags": 8,
- "listener": [Function anonymous],
- "next": undefined,
- "previous": [Circular],
- },
- "resistStopPropagation": false,
- "size": 1,
- },
- "message" => Object {
- "next": Listener {
- "callback": [Function bound onMessageEvent],
- "flags": 8,
- "listener": [Function bound onMessageEvent],
- "next": undefined,
- "previous": [Circular],
- },
- "resistStopPropagation": false,
- "size": 1,
- },
- "messageerror" => Object {
- "next": Listener {
- "callback": [Function bound onMessageEvent],
- "flags": 8,
- "listener": [Function bound onMessageEvent],
- "next": undefined,
- "previous": [Circular],
- },
- "resistStopPropagation": false,
- "size": 1,
- },
- },
- Symbol(events.maxEventTargetListeners): 10,
- Symbol(events.maxEventTargetListenersWarned): false,
- Symbol(kNewListener): [Function anonymous],
- Symbol(kRemoveListener): [Function anonymous],
- Symbol(nodejs.internal.kCurrentlyReceivingPorts): undefined,
- },
- Symbol(kOnMessage): [Function bound onMessageEvent],
- Symbol(kOnMessageError): [Function bound onMessageEvent],
- },
- "id": "fb18bbc3-347a-4c0d-a567-d4a84447d48d",
- "url": "ws://localhost/",
- },
- ]
+ Array []
❯ src/core/ws/WebSocketClientManager.test.ts:67:50
|
src/core/ws/WebSocketClientManager.test.ts > removes the extraneous message listener when the connection closes:
src/core/ws/WebSocketClientManager.test.ts#L157
AssertionError: expected "send" to not be called at all, but actually been called 1 times
Received:
1st send call:
Array [
"hello",
]
Number of calls: 1
❯ src/core/ws/WebSocketClientManager.test.ts:157:31
|
build
Process completed with exit code 1.
|
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, pnpm/action-setup@v2, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build
No files were found with the provided path: test/browser/test-results. No artifacts will be uploaded.
|