presidium 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,7 @@ const test = Test('WebSocketServer', function (socketHandler, httpHandler) {
44
44
  })
45
45
  .case(function saveServerMessagesAndCloseHandler(websocket) {
46
46
  websocket.on('message', message => {
47
- this.serverMessages.push(message)
47
+ this.serverMessages.push(message.toString('utf8'))
48
48
  websocket.send(message)
49
49
  })
50
50
  websocket.on('close', async () => {
@@ -62,8 +62,8 @@ const test = Test('WebSocketServer', function (socketHandler, httpHandler) {
62
62
  websocket.on('open', () => {
63
63
  didOpen = true
64
64
  })
65
- websocket.on('message', async message => {
66
- this.clientMessages.push(message)
65
+ websocket.on('message', async chunk => {
66
+ this.clientMessages.push(chunk.toString('utf8'))
67
67
  if (this.clientMessages.length == 5) {
68
68
  await new Promise(resolve => setTimeout(resolve, 100)) // wait for a round of detectAndCloseBrokenConnections
69
69
  websocket.pong = function noop() {} // overwrite pong to simulate disconnect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "A library for creating web services",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "rubico": "latest",
39
39
  "tar-stream": "^2.1.4",
40
40
  "thunk-test": "latest",
41
- "ws": "^7.3.1"
41
+ "ws": "^8.14.2"
42
42
  },
43
43
  "scripts": {
44
44
  "test": "node test.js",