mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
Keep the leaf-guard regexes inside the compiler's target
This commit is contained in:
1 parent
95baf58be7
commit
2b3a67d43c
1 file changed
+2
-2
@@ -48,7 +48,7 @@ describe("api-errors leaf module", () => {
|
||||
join(SRC, "lib/sharing/record-session-fence.ts"),
|
||||
"utf8",
|
||||
);
|
||||
const imports = source.match(/^import[^;]+from "@\/lib\/api-handler";/gms);
|
||||
const imports = source.match(/^import[^;]+from "@\/lib\/api-handler";/gm);
|
||||
for (const statement of imports ?? []) {
|
||||
expect(
|
||||
statement.startsWith("import type"),
|
||||
@@ -59,7 +59,7 @@ describe("api-errors leaf module", () => {
|
||||
|
||||
it("the leaf imports nothing but the fence contract", () => {
|
||||
const source = readFileSync(join(SRC, "lib/api-errors.ts"), "utf8");
|
||||
const imports = source.match(/^import[^;]+;/gms) ?? [];
|
||||
const imports = source.match(/^import[^;]+;/gm) ?? [];
|
||||
// Self-check: the walker found the one expected import.
|
||||
expect(imports.length).toBeGreaterThan(0);
|
||||
for (const statement of imports) {
|
||||
|
||||
Reference in new issue
Block a user