Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readRepoFile } from "~/utils/testing/repoPaths";
|
||||
|
||||
const runtimeFiles = [
|
||||
"apps/web/app/modules/ipAddress/services/IpAddressService.server.ts",
|
||||
"apps/web/app/modules/ipAddress/services/geoip.server.ts",
|
||||
"apps/web/app/modules/users/services/AuthService.ts",
|
||||
"apps/web/app/modules/workflowEngine/services/blocks/WorkflowBlockService.ts",
|
||||
"apps/web/app/routes/admin/analytics/settings.tsx",
|
||||
"apps/web/app/routes/app.$tenant/settings.tsx",
|
||||
];
|
||||
|
||||
// AD-22/EXT-12: IpAddressService delegiert die Env-Config an geoip.server.ts; damit ist
|
||||
// geoip.server.ts die config-backed Boundary-Datei (loadWebConfig → @toolctrl/config).
|
||||
const configBackedRuntimeFiles = [
|
||||
"apps/web/app/modules/ipAddress/services/geoip.server.ts",
|
||||
"apps/web/app/modules/users/services/AuthService.ts",
|
||||
"apps/web/app/routes/admin/analytics/settings.tsx",
|
||||
"apps/web/app/routes/app.$tenant/settings.tsx",
|
||||
];
|
||||
|
||||
describe("runtime NODE_ENV boundary", () => {
|
||||
it.each(runtimeFiles)("does not read process.env.NODE_ENV directly in %s", (relativePath) => {
|
||||
const source = readRepoFile(relativePath);
|
||||
|
||||
expect(source).not.toMatch(/process\.env\.NODE_ENV\b/);
|
||||
});
|
||||
|
||||
it.each(configBackedRuntimeFiles)("uses @toolctrl/config for runtime environment config in %s", (relativePath) => {
|
||||
const source = readRepoFile(relativePath);
|
||||
|
||||
expect(source).toContain("@toolctrl/config");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user