diff --git a/dashboard/tests/e2e/fixtures/cleanup.ts b/dashboard/tests/e2e/fixtures/cleanup.ts index 98bc1f7..3bca206 100644 --- a/dashboard/tests/e2e/fixtures/cleanup.ts +++ b/dashboard/tests/e2e/fixtures/cleanup.ts @@ -32,7 +32,10 @@ export class CleanupRegistry { if (this.items.length === 0) return; const api = await adminApi(); try { - for (const item of this.items.reverse()) { + // Copy-then-reverse so a defensive double-`run()` (or a + // caller that inspects the registry after a partial + // teardown) doesn't see the items in a re-reversed order. + for (const item of [...this.items].reverse()) { try { await item(api); } catch {