mirror of
https://github.com/thelounge/thelounge
synced 2024-11-24 21:13:06 +00:00
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:
parent
91ac363cc6
commit
a200bab8bd
1 changed files with 20 additions and 17 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue