test(qqbot): fix channel api bounded body assertion

This commit is contained in:
Vincent Koc
2026-06-19 16:35:55 +02:00
parent 51ebe87a09
commit b16fd6bee7

View File

@@ -101,8 +101,10 @@ describe("executeChannelApi", () => {
status: 503,
path: "/guilds/123/channels",
});
expect(JSON.stringify(result.details)).toContain("channel api unavailable");
expect(JSON.stringify(result.details)).not.toContain("tail");
const bodyPreview = (result.details as { details?: unknown }).details;
expect(typeof bodyPreview).toBe("string");
expect(bodyPreview).toContain("channel api unavailable");
expect(bodyPreview).not.toContain("tail");
expect(tracked.wasCanceled()).toBe(true);
expect(textSpy).not.toHaveBeenCalled();
expect(release).toHaveBeenCalledTimes(1);