This commit is contained in:
Andras Schmelczer 2025-05-24 13:23:24 +01:00
parent 4040c98754
commit e0b83bbc7a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 3 additions and 3 deletions

View file

@ -1,9 +1,9 @@
import { Logger } from "../tracing/logger";
import { globsToRegex } from "./globs-to-regexes";
import { globsToRegexes } from "./globs-to-regexes";
describe("globsToRegexes", () => {
it("basicExample", async () => {
const regex = globsToRegex([".git/**"], new Logger())[0];
const regex = globsToRegexes([".git/**"], new Logger())[0];
expect(regex.test(".git/objects/object")).toBeTruthy();
});

View file

@ -1,7 +1,7 @@
import { makeRe } from "minimatch";
import { Logger } from "../tracing/logger";
export function globsToRegex(globs: string[], logger: Logger): RegExp[] {
export function globsToRegexes(globs: string[], logger: Logger): RegExp[] {
return globs
.map((pattern) => {
const result = makeRe(pattern);