test/chan: getFilteredClone has more fields than the test thinks

The codebase shoves various things into channel objects to transmit them
for things like channel lists etc.

This however means that the type does contains the fields and needs
to export them.

We should clean up the events so that we can get rid of all that.
But for now, we adapt the test expectation to reality.
This commit is contained in:
Reto Brunner 2024-04-21 13:26:55 +02:00
parent 91ac363cc6
commit a200bab8bd

View file

@ -198,23 +198,26 @@ describe("Chan", function () {
it("should keep necessary properties", function () {
const chan = new Chan();
expect(chan.getFilteredClone())
.to.be.an("object")
.that.has.all.keys(
"firstUnread",
"highlight",
"id",
"key",
"messages",
"muted",
"totalMessages",
"name",
"state",
"topic",
"type",
"unread",
"users"
);
expect(chan.getFilteredClone()).to.be.an("object").that.has.all.keys(
"firstUnread",
"highlight",
"id",
"key",
"messages",
"muted",
"totalMessages",
"name",
"state",
"topic",
"type",
"unread",
"users",
// the following are there in special cases, need to fix the types
"num_users",
"special",
"closed",
"data"
);
});
it("should send only last message for non active channel", function () {