connor4312 / connor4312/nodejs-testing
No branch coverage
- Dominant language
- TypeScript
- Stars
- 67
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
I'm unable to see any branch coverage in the "test coverage" pane. I only see statement and function coverage.
I've created a minimal example to reproduce this.
```js
// main.mjs
export function foo(arg) {
return arg ? 1 : 2; // Two branches
}
```
```js
// main.test.mjs
import { test } from 'node:test';
import { strict as assert } from 'node:assert';
import { foo } from './main.mjs';
test('test', () => {
assert.equal(foo(true), 1); // Only one branch tested
});
```
I click "run tests with coverage" in the testing panel.
The coverage breakdown doesn't show branches:

If I hover over it, it says "0/0" branches covered:

Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report with main.mjs and main.test.mjs, then run the tests with coverage from the VS Code testing panel. Inspect how the coverage breakdown represents the two branches in foo; done means the pane reports branch coverage rather than 0/0 while preserving statement and function coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, typescript, vscode
- Domain
- devtools, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100