Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import path from "node:path";
|
||||
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
const entrySource = readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), "entry.client.tsx"), "utf8");
|
||||
|
||||
describe("entry.client hydration contract", () => {
|
||||
test("starts observability before hydration without waiting indefinitely", () => {
|
||||
expect(entrySource).toContain("const observabilityReady = initClientObservability().catch");
|
||||
expect(entrySource).toContain("const OBSERVABILITY_HYDRATION_GRACE_MS = 250");
|
||||
expect(entrySource).toContain("function waitForObservabilityHydrationGrace()");
|
||||
expect(entrySource).toContain("Promise.race([observabilityReady, timeout])");
|
||||
expect(entrySource).toContain("await waitForObservabilityHydrationGrace()");
|
||||
expect(entrySource).not.toContain("await observabilityReady;");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user