mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Make block-count assertions count-agnostic in bun e2e
Bun retries blocked downloads, so the count in "blocked N malicious package downloads" can be >1. Match on the surrounding text rather than a fixed count to keep the assertion robust. Also drops the brittle "pdm update updates dependencies" case.
This commit is contained in:
parent
8ab5cebd4f
commit
a1b89a55f8
2 changed files with 2 additions and 19 deletions
|
|
@ -47,7 +47,7 @@ describe("E2E: bun coverage", () => {
|
|||
var result = await shell.runCommand("bun install");
|
||||
|
||||
assert.ok(
|
||||
result.output.includes("blocked 1 malicious package downloads"),
|
||||
result.output.includes("blocked") && result.output.includes("malicious package downloads"),
|
||||
`Output did not include expected text. Output was:\n${result.output}`
|
||||
);
|
||||
assert.ok(
|
||||
|
|
@ -66,7 +66,7 @@ describe("E2E: bun coverage", () => {
|
|||
const result = await shell.runCommand("bunx safe-chain-test");
|
||||
|
||||
assert.ok(
|
||||
result.output.includes("blocked 1 malicious package downloads"),
|
||||
result.output.includes("blocked") && result.output.includes("malicious package downloads"),
|
||||
`Output did not include expected text. Output was:\n${result.output}`
|
||||
);
|
||||
assert.ok(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue