This commit is contained in:
gparant 2020-05-04 01:54:49 +02:00
parent 58a1a8a3c9
commit 03bda7ddd5

View File

@ -12,7 +12,7 @@ describe("Message Model", () => {
it("should expose a toJson method", () => {
let message = {userId: "test1", roomId: "test2"};
let messageObject = new Message(message);
expect(messageObject.toJson()).toEqual({userId: "test1", roomId: "test2"});
expect(messageObject.toJson()).toEqual({userId: "test1", roomId: "test2", name: "foo"});
})
it("should find throw error when no userId", () => {