Skip to content

Commit 33c2665

Browse files
committed
test(nextcloud-talk): assert exact safe error
1 parent 550b6e9 commit 33c2665

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

extensions/nextcloud-talk/src/send.fetch-timeout.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function expectHangingTalkRequestTimesOut(params: {
4646
);
4747
}
4848

49-
describe("nextcloud-talk send fetch timeouts", () => {
49+
describe("nextcloud-talk send error responses", () => {
5050
it("keeps send error body snippets UTF-16 safe", async () => {
5151
const prefix = "e".repeat(199);
5252
const errorBody = `${prefix}\u{1F600}tail`;
@@ -65,11 +65,13 @@ describe("nextcloud-talk send fetch timeouts", () => {
6565
cfg: createTalkConfig(baseUrl),
6666
timeoutMs: REQUEST_TIMEOUT_MS,
6767
}),
68-
).rejects.toThrow(`Nextcloud Talk: bad request - ${prefix}…`);
68+
).rejects.toThrow(new Error(`Nextcloud Talk: bad request - ${prefix}…`));
6969
},
7070
);
7171
});
72+
});
7273

74+
describe("nextcloud-talk send fetch timeouts", () => {
7375
it("bounds hanging message and reaction sends", async () => {
7476
await expectHangingTalkRequestTimesOut({
7577
path: "/ocs/v2.php/apps/spreed/api/v1/bot/abc123/message",

0 commit comments

Comments
 (0)