mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 21:01:52 +00:00
Address remaining review comments for peer dependency warnings
Test improvements: - Line 7681: Use line-anchored regex pattern /^warn:[^\n]*...$/ to match only single lines (same fix as line 3916) Regression test 26076 rewrite: - Remove setDefaultTimeout and use local VerdaccioRegistry instead of network npm to make test hermetic and fast - Fix await order: await stdout/stderr BEFORE exited for better error messages on failure - Update regex pattern to support scoped packages and hyphenated names using /[@\w./-]+/ instead of /\w+/ - Publish test packages locally to create controlled peer dep mismatch scenario Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7678,7 +7678,10 @@ describe("yarn tests", () => {
|
||||
expect(err).not.toContain("error:");
|
||||
expect(err).not.toContain("not found");
|
||||
// New improved peer dependency warning format shows the requiring package, expected version, and actual version
|
||||
expect(err).toMatch(/warn:.*peer-deps-fixed has unmet peer dependency no-deps@\^1\.0\.0 \(found 2\.0\.0\)/);
|
||||
// Use line-anchored pattern to avoid matching across lines
|
||||
expect(err).toMatch(
|
||||
/^warn:[^\n]*peer-deps-fixed[^\n]*has unmet peer dependency no-deps@\^1\.0\.0 \(found 2\.0\.0\)$/m,
|
||||
);
|
||||
expect(out.replace(/\s*\[[0-9\.]+m?s\]\s*$/, "").split(/\r?\n/)).toEqual([
|
||||
expect.stringContaining("bun install v1."),
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user