test: verify housekeeping foundation boundaries
This commit is contained in:
1 parent
a47b4eb195
commit
a158c78a7c
3 files changed
+524
-3
No files matched your search
+2
-1
@@ -22,7 +22,8 @@
|
|||||||
"db:migrate": "tsx scripts/apply-migrations.ts",
|
"db:migrate": "tsx scripts/apply-migrations.ts",
|
||||||
"db:migrate:status": "tsx scripts/apply-migrations.ts --status",
|
"db:migrate:status": "tsx scripts/apply-migrations.ts --status",
|
||||||
"db:studio": "drizzle-kit studio",
|
"db:studio": "drizzle-kit studio",
|
||||||
"hk:matrix:check": "tsx scripts/verify-housekeeping-matrix.ts"
|
"hk:matrix:check": "tsx scripts/verify-housekeeping-matrix.ts",
|
||||||
|
"test:housekeeping": "vitest run --coverage.enabled=false src/features/housekeeping src/lib/admin-theme-source-audit.test.ts src/lib/admin/authorization-contract.test.ts"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,ts,jsx,tsx,json}": "biome check --write --no-errors-on-unmatched"
|
"*.{js,ts,jsx,tsx,json}": "biome check --write --no-errors-on-unmatched"
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,12 @@ import { readdirSync, readFileSync } from "node:fs";
|
|||||||
import { join, relative } from "node:path";
|
import { join, relative } from "node:path";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
const ROOTS = ["src/app/admin", "src/components/admin"];
|
const ROOTS = [
|
||||||
|
"src/app/admin",
|
||||||
|
"src/components/admin",
|
||||||
|
"src/app/admin-next",
|
||||||
|
"src/features/housekeeping",
|
||||||
|
];
|
||||||
const GRAPHICAL_ALLOWLIST = [
|
const GRAPHICAL_ALLOWLIST = [
|
||||||
"src/app/admin/favicon/favicon-generator.tsx",
|
"src/app/admin/favicon/favicon-generator.tsx",
|
||||||
"src/app/admin/import/clone/import-clone-client.tsx",
|
"src/app/admin/import/clone/import-clone-client.tsx",
|
||||||
@@ -34,7 +39,9 @@ function sourceFiles(directory: string): string[] {
|
|||||||
const path = join(directory, entry.name);
|
const path = join(directory, entry.name);
|
||||||
return entry.isDirectory()
|
return entry.isDirectory()
|
||||||
? sourceFiles(path)
|
? sourceFiles(path)
|
||||||
: /\.(?:ts|tsx)$/.test(entry.name)
|
: /\.(?:ts|tsx)$/.test(entry.name) &&
|
||||||
|
!entry.name.endsWith(".test.ts") &&
|
||||||
|
!entry.name.endsWith(".test.tsx")
|
||||||
? [path]
|
? [path]
|
||||||
: [];
|
: [];
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user