Keep the leaf-guard regexes inside the compiler's target

This commit is contained in:
Marc-André Bombeck committed 2026-08-14 02:34:40 +02:00
1 parent 95baf58be7
commit 2b3a67d43c
1 file changed
+2 -2
+2 -2
View File
@@ -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) {