Skip to content
TypeScript

test(web): remove redundant thread sort fallback tests (#15095)

t3-code[bot]cfdff56f7b3c
diff --git a/apps/web/src/lib/threadSort.test.ts b/apps/web/src/lib/threadSort.test.ts
index 9ae3c3386cd..0d48fbe3e13 100644
--- a/apps/web/src/lib/threadSort.test.ts
+++ b/apps/web/src/lib/threadSort.test.ts
@@ -117,56 +117,6 @@ describe("sortThreads", () => {
]);
});
- it("falls back to createdAt when updatedAt is invalid", () => {
- const sorted = sortThreads(
- [
- makeThread({
- id: ThreadId.make("thread-1"),
- createdAt: "2026-03-09T10:00:00.000Z",
- updatedAt: "invalid-date" as never,
- messages: [],
- }),
- makeThread({
- id: ThreadId.make("thread-2"),
- createdAt: "2026-03-09T09:00:00.000Z",
- updatedAt: "2026-03-09T09:30:00.000Z",
- messages: [],
- }),
- ],
- "updated_at",
- );
-
- expect(sorted.map((thread) => thread.id)).toEqual([
- ThreadId.make("thread-1"),
- ThreadId.make("thread-2"),
- ]);
- });
-
- it("falls back to id ordering when threads have no sortable timestamps", () => {
- const sorted = sortThreads(
- [
- makeThread({
- id: ThreadId.make("thread-1"),
- createdAt: "invalid-created-at" as never,
- updatedAt: "invalid-updated-at" as never,
- messages: [],
- }),
- makeThread({
- id: ThreadId.make("thread-2"),
- createdAt: "invalid-created-at" as never,
- updatedAt: "invalid-updated-at" as never,
- messages: [],
- }),
- ],
- "updated_at",
- );
-
- expect(sorted.map((thread) => thread.id)).toEqual([
- ThreadId.make("thread-2"),
- ThreadId.make("thread-1"),
- ]);
- });
-
it("can sort threads by createdAt when configured", () => {
const sorted = sortThreads(
[