Skip to content

Commit a99729f

Browse files
committed
test: tighten effective tool policy assertions
1 parent 98e93ce commit a99729f

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎src/agents/pi-embedded-runner/effective-tool-policy.test.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ describe("applyFinalEffectiveToolPolicy", () => {
126126
warn: (message) => warnings.push(message),
127127
});
128128

129-
expect(warnings).not.toEqual(
130-
expect.arrayContaining([expect.stringContaining("unknown entries")]),
131-
);
129+
expect(warnings.filter((message) => message.includes("unknown entries"))).toStrictEqual([]);
132130
});
133131

134132
it("still warns on genuinely unknown entries in the bundled pass", () => {
@@ -139,9 +137,7 @@ describe("applyFinalEffectiveToolPolicy", () => {
139137
warn: (message) => warnings.push(message),
140138
});
141139

142-
expect(warnings).toEqual(
143-
expect.arrayContaining([expect.stringContaining("totally-made-up-tool")]),
144-
);
140+
expect(warnings.filter((message) => message.includes("totally-made-up-tool"))).toHaveLength(1);
145141
});
146142

147143
it("keeps bundle MCP tools in the coding profile via plugin metadata", () => {

0 commit comments

Comments
 (0)