| 1 | import assert from "node:assert/strict"; |
| 2 | import { benchHydrationDelay } from "../lib/bridgeBenchFixtures"; |
| 3 | |
| 4 | const soak = "?mock=bench&bench=1&app-lifecycle-probe=1&bench-hydration=soak"; |
| 5 | assert.equal(benchHydrationDelay(soak), 0); |
| 6 | for (const parameter of ["mock", "bench", "app-lifecycle-probe", "bench-hydration"]) { |
| 7 | const params = new URLSearchParams(soak); |
| 8 | params.delete(parameter); |
| 9 | assert.equal(benchHydrationDelay(params.toString()), 1_500, parameter); |
| 10 | } |
| 11 | assert.equal(benchHydrationDelay("?mock=bench&bench=1"), 1_500); |
| 12 | assert.equal(benchHydrationDelay("?mock=bench&bench=1&bench-hydration=unknown"), 1_500); |
| 13 | console.log("PASS only the explicit memory soak omits synthetic latency; browser/native fixtures keep delayed hydration"); |
| 14 |