WhatBrokeToday
GTA 6FAQ
Bun

Bun Test Coverage "All Files" Row Uses Unweighted Mean Instead of Line Count

minor

Is it fixed? Not yet.

Ongoing since Nov 17, 03:29 UTC. First reported Nov 17, 03:29 UTC.

What happened

Bun version 1.4.5-canary.1+237bba51e calculates the "All files" row in test coverage as an unweighted mean of per-file percentages, whereas Istanbul, Jest, and Vitest weight by line counts.

What caused it?

The coverage calculation computes an unweighted mean across files rather than weighting percentages by line counts.

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    bun test --coverage: the "All files" row is an unweighted mean of the per-file percentages (Istanbul, Jest and Vitest weight by line counts)

    Source

Evidence

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    bun test --coverage: the "All files" row is an unweighted mean of the per-file percentages (Istanbul, Jest and Vitest weight by line counts)(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.5-canary.1+237bba51e What platform is your computer? Darwin arm64 What steps can reproduce the bug? big.ts has 101 lines that a test runs. small.ts has 4, of which a test runs 3. // small.ts export function f(a: number) { if (a > 0) { return 1; } return 2; } // a.test.ts import { test, expect } from "bun:test"; import { big } from "./big"; // 101 lines, all run import { f } from "./small"; test("t", () => { expect(big()).toBeGreaterThan(0);…

    by josebant29 0upvotes 1comments

FAQ

What happened in the Bun issue?

Bun version 1.4.5-canary.1+237bba51e calculates the "All files" row in test coverage as an unweighted mean of per-file percentages, whereas Istanbul, Jest, and Vitest weight by line counts.

What is affected by the Bun issue?

Bun (versions: 1.4.5-canary.1+237bba51e).

When did the Bun issue start and end?

It started Nov 17, 03:29 UTC and is still ongoing (2 d 1 h so far). This page updates as it develops.

How do I get alerts for Bun?

Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.