Skip to content

Commit 3487c8d

Browse files
committed
test(mobile): pin the compiler cache for the sidebar thread list
1 parent d7658d1 commit 3487c8d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎apps/mobile/src/reactCompilerCoverage.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ describe("React Compiler coverage", () => {
191191
).toEqual([true]);
192192
});
193193

194+
// The compiler once silently dropped this cache, so every sidebar render
195+
// rebuilt the list and re-registered the thread jump shortcuts.
196+
it("caches the sidebar thread list", () => {
197+
expect(
198+
compilerCachedCalls(
199+
"src/features/threads/ThreadNavigationSidebar.tsx",
200+
"buildThreadListV2ListItems",
201+
),
202+
).toEqual([true]);
203+
});
204+
194205
it("lists only files that exist", () => {
195206
expect(Object.keys(KNOWN_BAILOUTS).filter((file) => !sourceFiles.includes(file))).toEqual([]);
196207
});

0 commit comments

Comments
 (0)