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.
This commit is contained in:
l0ng-ai
2026-11-14 16:14:27 +08:00
committed by GitHub
parent 735830d642
commit ec862b3668
+1 -1
View File
@@ -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",
),
);