Expand t3 architecture guard to all runtime source files
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
5a963a63e8
commit
39fb56b2bc
1 file changed
+9
-7
@@ -2,6 +2,8 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const RUNTIME_SOURCE_FILES = ["cli.ts", "runtimeApiServer.ts"] as const;
|
||||
|
||||
describe("runtime architecture boundaries", () => {
|
||||
it("keeps runtime API server wired through runtime-core services", () => {
|
||||
const sourcePath = path.resolve(import.meta.dirname, "runtimeApiServer.ts");
|
||||
@@ -13,12 +15,12 @@ describe("runtime architecture boundaries", () => {
|
||||
expect(source).toContain("TodoStore");
|
||||
});
|
||||
|
||||
it("avoids direct desktop service imports in runtime API server", () => {
|
||||
const sourcePath = path.resolve(import.meta.dirname, "runtimeApiServer.ts");
|
||||
const source = fs.readFileSync(sourcePath, "utf8");
|
||||
for (const fileName of RUNTIME_SOURCE_FILES) {
|
||||
it(`avoids direct desktop service imports in ${fileName}`, () => {
|
||||
const sourcePath = path.resolve(import.meta.dirname, fileName);
|
||||
const source = fs.readFileSync(sourcePath, "utf8");
|
||||
|
||||
expect(source).not.toContain("../../desktop/src/processManager");
|
||||
expect(source).not.toContain("../../desktop/src/providerManager");
|
||||
expect(source).not.toContain("../../desktop/src/todoStore");
|
||||
});
|
||||
expect(source).not.toContain("../../desktop/src/");
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user