Skip to content

Commit c93c786

Browse files
committed
Fixes
1 parent d49e24a commit c93c786

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/_env/srv/handlers/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ module.exports = (srv) => {
8282
{
8383
wsContexts: [ID],
8484
contexts: [ID],
85-
// wsIncludeCurrentUser: req.data.num === 1,
85+
wsIncludeCurrentUser: req.data.num === 0,
8686
wsExcludeCurrentUser: req.data.num === 1,
8787
currentUser: {
88-
// include: req.data.num === 1,
88+
include: req.data.num === 0,
8989
exclude: req.data.num === 1,
9090
},
9191
},

test/socketio/pcp_socket.io.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const cds = require("@sap/cds");
44

5-
const { connect, disconnect, emitMessage, waitForEvent } = require("../_env/util/socket.io");
5+
const { connect, disconnect, emitEvent, emitMessage, waitForEvent } = require("../_env/util/socket.io");
66

77
cds.test(__dirname + "/../_env");
88

@@ -48,8 +48,8 @@ describe("PCP", () => {
4848
test("Event Notification", async () => {
4949
const waitNotification1Promise = waitForEvent(socket, "notification1");
5050
const waitNotification2Promise = waitForEvent(socket, "notification2");
51-
const result = await emitMessage(socket, "sendNotification", pcpMessage);
52-
expect(result).toBeNull();
51+
const result = await emitEvent(socket, "sendNotification", pcpMessage);
52+
expect(result).toBe(true);
5353
const waitResult1 = await waitNotification1Promise;
5454
expect(waitResult1).toEqual(pcpMessage1);
5555
const waitResult2 = await waitNotification2Promise;

0 commit comments

Comments
 (0)