style(web): 即梦模型目录测试 - 统一测试代码格式
This commit is contained in:
1 parent
bda114b29e
commit
f62cc5ef3e
1 file changed
+1
-4
@@ -296,10 +296,7 @@ test("Dreamina catalog timeout releases a hung shared request so generation can
|
|||||||
await expect(first).rejects.toMatchObject({ name: "AbortError" });
|
await expect(first).rejects.toMatchObject({ name: "AbortError" });
|
||||||
await Bun.sleep(20);
|
await Bun.sleep(20);
|
||||||
|
|
||||||
const recovered = await Promise.race([
|
const recovered = await Promise.race([store.getState().ensureReady(), Bun.sleep(40).then(() => "stuck" as const)]);
|
||||||
store.getState().ensureReady(),
|
|
||||||
Bun.sleep(40).then(() => "stuck" as const),
|
|
||||||
]);
|
|
||||||
expect(recovered).not.toBe("stuck");
|
expect(recovered).not.toBe("stuck");
|
||||||
expect(recovered).toMatchObject([{ id: "seedance-recovered" }]);
|
expect(recovered).toMatchObject([{ id: "seedance-recovered" }]);
|
||||||
expect(store.getState()).toMatchObject({ state: "ready", cacheScope: `${"a".repeat(64)}:4` });
|
expect(store.getState()).toMatchObject({ state: "ready", cacheScope: `${"a".repeat(64)}:4` });
|
||||||
|
|||||||
Reference in new issue
Block a user