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
+31
@@ -0,0 +1,31 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const readViteConfigSource = () => readFile(resolve(process.cwd(), "apps/web/vite.config.ts"), "utf8");
|
||||
|
||||
describe("vite config integration wiring", () => {
|
||||
it("wires the manual chunk helper into Rollup output without running a build", async () => {
|
||||
const source = await readViteConfigSource();
|
||||
|
||||
expect(source).toContain('import { getManualChunkName } from "./app/utils/build/manualChunks";');
|
||||
expect(source).toMatch(/rollupOptions:\s*{[\s\S]*output:\s*{[\s\S]*manualChunks:\s*getManualChunkName/);
|
||||
});
|
||||
|
||||
it("keeps build warning triage connected to Rollup onwarn", async () => {
|
||||
const source = await readViteConfigSource();
|
||||
|
||||
expect(source).toContain('import { shouldSuppressBuildWarning } from "./app/utils/build/buildWarningTriage";');
|
||||
expect(source).toMatch(/onwarn\(warning,\s*defaultHandler\)\s*{[\s\S]*shouldSuppressBuildWarning\(warning\)/);
|
||||
expect(source).toMatch(/defaultHandler\(warning\)/);
|
||||
});
|
||||
|
||||
it("keeps production source maps opt-in for Sentry release lanes", async () => {
|
||||
const source = await readViteConfigSource();
|
||||
|
||||
expect(source).toContain('process.env.TOOLCTRL_BUILD_SOURCEMAPS === "1"');
|
||||
expect(source).toContain("process.env.SENTRY_AUTH_TOKEN && buildSourcemapsEnabled");
|
||||
expect(source).toMatch(/sourcemap:\s*buildSourcemapsEnabled/);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user