fix(test): await pending frontend module teardown

This commit is contained in:
t8y2 committed 2026-08-22 08:33:19 +00:00
1 parent 82e5756325
commit 6304335fcc
2 files changed
+5 -1

No files matched your search

@@ -37,6 +37,7 @@ describe("connection root lookup", () => {
// markConnectionLost → clearConnectionNodeLoading 经连接根查找定位节点:
// 分组内的连接必须能被找到并清除 loading
store.markConnectionLost("pg-1", new Error("connection lost"));
await vi.dynamicImportSettled();
expect(conn.isLoading).toBe(false);
});
@@ -55,6 +56,7 @@ describe("connection root lookup", () => {
(collidingDeepNode as { isLoading?: boolean }).isLoading = true;
store.markConnectionLost("pg-1", new Error("connection lost"));
await vi.dynamicImportSettled();
// 真正的连接根被清除 loading;深层碰撞节点不受影响
expect(realRoot.isLoading).toBe(false);
expect((collidingDeepNode as { isLoading?: boolean }).isLoading).toBe(true);