expect(messageObject.userId).toBe("test1");
expect(messageObject.roomId).toBe("test2");
expect(messageObject.name).toBe("foo");
- expect(messageObject.name).toBe("user");
+ expect(messageObject.frame).toBe("user");
})
it("should expose a toJson method", () => {
- let message = {userId: "test1", roomId: "test2", name: "foo"};
+ let message = {userId: "test1", roomId: "test2", name: "foo", frame: "user"};
let messageObject = new Message(message);
expect(messageObject.toJson()).toEqual({userId: "test1", roomId: "test2", name: "foo", frame: "user"});
});