Code coverage for web settings

This commit is contained in:
Cadence Ember
2025-02-21 16:41:43 +13:00
parent 21c7b35136
commit 62be5f7091
5 changed files with 92 additions and 74 deletions
+13 -1
View File
@@ -518,6 +518,18 @@ test("web link room: successfully calls createRoom", async t => {
t.equal(roomID, "!zTMspHVUBhFLLSdmnS:cadence.moe")
t.equal(key, "!NDbIqNpJyPvfKRnNcr:cadence.moe")
return {via: ["cadence.moe"]}
} else if (type === "m.room.name") {
called++
t.equal(roomID, "!NDbIqNpJyPvfKRnNcr:cadence.moe")
return {}
} else if (type === "m.room.avatar") {
called++
t.equal(roomID, "!NDbIqNpJyPvfKRnNcr:cadence.moe")
return {}
} else if (type === "m.room.topic") {
called++
t.equal(roomID, "!NDbIqNpJyPvfKRnNcr:cadence.moe")
return {}
}
},
async sendEvent(roomID, type, content) {
@@ -536,7 +548,7 @@ test("web link room: successfully calls createRoom", async t => {
}
}
})
t.equal(called, 5)
t.equal(called, 8)
})
// *****