From ec862b3668e27ccb00cfff5336a2be54130f6869 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 14 Nov 2026 16:14:27 +0800 Subject: [PATCH] test(libraries): index the refreshed node's children safely (#3324) The refresh test from #3317 failed pnpm typecheck under noUncheckedIndexedAccess; it now uses optional access at each index. --- src/features/libraries/refresh.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/libraries/refresh.test.ts b/src/features/libraries/refresh.test.ts index 6bc8fe171..1e38d4720 100644 --- a/src/features/libraries/refresh.test.ts +++ b/src/features/libraries/refresh.test.ts @@ -53,7 +53,7 @@ describe("External Libraries refresh", () => { results.push([rust("0.8.0")]); await executeAction("libraries.reload"); await vi.waitFor(() => - expect(useProjectViewRoots.getState().roots.get("externalLibraries")?.children?.[0].children?.[0].label).toBe( + expect(useProjectViewRoots.getState().roots.get("externalLibraries")?.children?.[0]?.children?.[0]?.label).toBe( "itoa 0.8.0", ), );