




















@@ -272,20 +272,17 @@ describe("resolveAllowAlwaysPatterns", () => {
272272strictInlineEval: true,
273273});
274274275-expect(entries).toEqual([
276-expect.objectContaining({
277-pattern: awk,
278-argPattern: expect.any(String),
279-}),
280-]);
281-expect(
282-matchAllowlist(
283-entries,
284-resolution.execution ?? null,
285-[awk, "-F", ",", "-f", "script.awk", "data.csv"],
286-"win32",
287-),
288-).toEqual(expect.objectContaining({ pattern: awk, argPattern: expect.any(String) }));
275+expect(entries).toHaveLength(1);
276+expect(entries[0]?.pattern).toBe(awk);
277+expect(typeof entries[0]?.argPattern).toBe("string");
278+const matched = matchAllowlist(
279+entries,
280+resolution.execution ?? null,
281+[awk, "-F", ",", "-f", "script.awk", "data.csv"],
282+"win32",
283+);
284+expect(matched?.pattern).toBe(awk);
285+expect(typeof matched?.argPattern).toBe("string");
289286expect(
290287matchAllowlist(
291288entries,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。