test: harden shared-worker runtime setup

This commit is contained in:
Peter Steinberger
2026-04-03 18:17:59 +01:00
parent 2981cce130
commit e0580e6863
23 changed files with 292 additions and 117 deletions

View File

@@ -294,10 +294,13 @@ describe("command queue", () => {
const blocker2 = new Promise<void>((r) => {
resolve2 = r;
});
const firstStarted = createDeferred();
const first = enqueueCommandInLane(lane, async () => {
firstStarted.resolve();
await blocker1;
});
await firstStarted.promise;
const drainPromise = waitForActiveTasks(2000);
// Starts after waitForActiveTasks snapshot and should not block drain completion.