T001–T006: Phase 1 setup (workspace, Biome, TS, Vitest, layer boundary enforcement)
This commit is contained in:
16
packages/domain/src/__tests__/layer-boundaries.test.ts
Normal file
16
packages/domain/src/__tests__/layer-boundaries.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { checkLayerBoundaries } from "../../../../scripts/check-layer-boundaries.mjs";
|
||||
|
||||
describe("layer boundaries", () => {
|
||||
it("domain and application packages have no forbidden imports", () => {
|
||||
const violations = checkLayerBoundaries();
|
||||
if (violations.length > 0) {
|
||||
const messages = violations.map(
|
||||
(v) =>
|
||||
`${v.file}:${v.line} imports "${v.importPath}" (forbidden: ${v.forbidden})`,
|
||||
);
|
||||
throw new Error(`Layer boundary violations:\n ${messages.join("\n ")}`);
|
||||
}
|
||||
expect(violations).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
1
packages/domain/src/index.ts
Normal file
1
packages/domain/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user