Skip to content

Commit ca5b338

Browse files
test(web): remove redundant thread sort fallback tests
1 parent fed41fa commit ca5b338

1 file changed

Lines changed: 0 additions & 50 deletions

File tree

‎apps/web/src/lib/threadSort.test.ts‎

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -117,56 +117,6 @@ describe("sortThreads", () => {
117117
]);
118118
});
119119

120-
it("falls back to createdAt when updatedAt is invalid", () => {
121-
const sorted = sortThreads(
122-
[
123-
makeThread({
124-
id: ThreadId.make("thread-1"),
125-
createdAt: "2026-03-09T10:00:00.000Z",
126-
updatedAt: "invalid-date" as never,
127-
messages: [],
128-
}),
129-
makeThread({
130-
id: ThreadId.make("thread-2"),
131-
createdAt: "2026-03-09T09:00:00.000Z",
132-
updatedAt: "2026-03-09T09:30:00.000Z",
133-
messages: [],
134-
}),
135-
],
136-
"updated_at",
137-
);
138-
139-
expect(sorted.map((thread) => thread.id)).toEqual([
140-
ThreadId.make("thread-1"),
141-
ThreadId.make("thread-2"),
142-
]);
143-
});
144-
145-
it("falls back to id ordering when threads have no sortable timestamps", () => {
146-
const sorted = sortThreads(
147-
[
148-
makeThread({
149-
id: ThreadId.make("thread-1"),
150-
createdAt: "invalid-created-at" as never,
151-
updatedAt: "invalid-updated-at" as never,
152-
messages: [],
153-
}),
154-
makeThread({
155-
id: ThreadId.make("thread-2"),
156-
createdAt: "invalid-created-at" as never,
157-
updatedAt: "invalid-updated-at" as never,
158-
messages: [],
159-
}),
160-
],
161-
"updated_at",
162-
);
163-
164-
expect(sorted.map((thread) => thread.id)).toEqual([
165-
ThreadId.make("thread-2"),
166-
ThreadId.make("thread-1"),
167-
]);
168-
});
169-
170120
it("can sort threads by createdAt when configured", () => {
171121
const sorted = sortThreads(
172122
[

0 commit comments

Comments
 (0)