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,7 +2,12 @@ import { readdirSync, readFileSync } from "node:fs";
|
||||
import { join, relative } from "node:path";
|
||||
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 = [
|
||||
"src/app/admin/favicon/favicon-generator.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);
|
||||
return entry.isDirectory()
|
||||
? sourceFiles(path)
|
||||
: /\.(?:ts|tsx)$/.test(entry.name)
|
||||
: /\.(?:ts|tsx)$/.test(entry.name) &&
|
||||
!entry.name.endsWith(".test.ts") &&
|
||||
!entry.name.endsWith(".test.tsx")
|
||||
? [path]
|
||||
: [];
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user