test(discord): stabilize parent-info + doctor migration assertions (#25028)

This commit is contained in:
Peter Steinberger
2026-02-24 04:10:52 +00:00
committed by GitHub
parent dd41a78458
commit 721d8b2278
2 changed files with 11 additions and 4 deletions

View File

@@ -1,8 +1,13 @@
import { ChannelType } from "@buape/carbon";
import { describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { __resetDiscordChannelInfoCacheForTest } from "./message-utils.js";
import { resolveDiscordThreadParentInfo } from "./threading.js";
describe("resolveDiscordThreadParentInfo", () => {
beforeEach(() => {
__resetDiscordChannelInfoCacheForTest();
});
it("falls back to fetched thread parentId when parentId is missing in payload", async () => {
const fetchChannel = vi.fn(async (channelId: string) => {
if (channelId === "thread-1") {