test: avoid line count filter allocations

This commit is contained in:
Peter Steinberger
2026-05-08 22:13:41 +01:00
parent 2f26025085
commit edfc5294cb
6 changed files with 58 additions and 8 deletions

View File

@@ -4282,7 +4282,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
},
});
expect(registry.services.filter((entry) => entry.service.id === "shared-service")).toHaveLength(
expect(countMatching(registry.services, (entry) => entry.service.id === "shared-service")).toBe(
1,
);
expectNoDiagnosticContaining({