Browse Source

Fix ws test

rigwild 2 years ago
parent
commit
0290778021
2 changed files with 3 additions and 3 deletions
  1. 1 1
      package.json
  2. 2 2
      test/api/databaseWebSocket.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "expe-web",
-  "version": "0.1.5",
+  "version": "0.1.6",
   "private": true,
   "scripts": {
     "server:start": "node -r esm server/index.js",

+ 2 - 2
test/api/databaseWebSocket.js

@@ -62,14 +62,14 @@ test('Check WebSocket server is working', async t => {
       received++
       if (sent === 1) {
         // Send data on receive
-        t.is('ok', receivedData, json(receivedData))
+        t.is('{"message":"ok"}', receivedData, json(receivedData))
         ws.send(JSON.stringify({ AUTOMATED_TEST_WS: true, TEST_OBJECT: { msg: 'message' } }))
         t.pass()
         sent++
       }
       else if (sent === 2) {
         // Send invalid JSON data
-        t.is('ok', receivedData, json(receivedData))
+        t.is('{"message":"ok"}', receivedData, json(receivedData))
         ws.send('Not a valid JSON string')
         t.pass()
         sent++