mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 15:12:23 +03:00
Merged — locally validated (typecheck:core clean, gates green). Thanks for the extra regression coverage!
35 lines
986 B
TypeScript
35 lines
986 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import { build } from "esbuild";
|
|
|
|
const REPO_ROOT = fileURLToPath(new URL("../..", import.meta.url));
|
|
|
|
async function assertBrowserBundleSafe(relativePath: string) {
|
|
await assert.doesNotReject(
|
|
build({
|
|
absWorkingDir: REPO_ROOT,
|
|
entryPoints: [fileURLToPath(new URL(relativePath, import.meta.url))],
|
|
bundle: true,
|
|
format: "esm",
|
|
logLevel: "silent",
|
|
platform: "browser",
|
|
tsconfig: "tsconfig.json",
|
|
write: false,
|
|
})
|
|
);
|
|
}
|
|
|
|
test("media page client entry stays browser-bundle safe", async () => {
|
|
await assertBrowserBundleSafe(
|
|
"../../src/app/(dashboard)/dashboard/cache/media/MediaPageClient.tsx"
|
|
);
|
|
});
|
|
|
|
test("provider detail client entry stays browser-bundle safe", async () => {
|
|
await assertBrowserBundleSafe(
|
|
"../../src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx"
|
|
);
|
|
});
|