# test(browser): cover instance headless overrides

Adds regression coverage for browser instance headless inheritance and overrides in both directions.

| | |
| --- | --- |
| Status | MERGED · CHECKS FAILING |
| Source | github:vitest-dev/vitest#10851 |
| Original | https://github.com/vitest-dev/vitest/pull/10851 |
| Workspace | Showcase |
| Tags | github, code, typescript |

## What it does

**A single-file change to browser-configs.test.ts, 19 lines.**

1 file changed across 1 area of vitest-dev/vitest, 19 added and 0 removed.

Adds regression coverage for browser instance headless inheritance and overrides in both directions.

**Diagram: Where the change landed. Node size is not to scale; the line counts are exact.**

- vitest (1 files, 19 lines) [accent]
- Tests (1 file, 19 lines) [good]
- browser-configs.test.ts (+19 −0) [bad]
- vitest -> Tests
- Tests -> browser-configs.test.ts : heaviest

- **Heaviest file.** test/e2e/test/config/browser-configs.test.ts, +19 −0, which is 100% of the change.
- **Tests moved with it.** 1 test file changed alongside 0 source files.
- **CI is red.** 1 check is failing, so the change is not currently in a mergeable state.

## How it works

**The largest single edit is in browser-configs.test.ts.**

Quoted verbatim from the diff. This is the biggest hunk by changed lines, which is where a reviewer's attention usually belongs first.

```typescript
@@ -288,6 +288,25 @@ test('inherits browser options', async () => {
   ])
 })
 
+test.each([true, false])('browser instance headless overrides root headless: $0', async (headless) => {
+  const projects = await config({
+    browser: {
+      enabled: true,
+      provider: preview(),
+      headless,
+      instances: [
+        { browser: 'chromium', name: 'inherits-root' },
+        { browser: 'firefox', name: 'overrides-root', headless: !headless },
+      ],
+    },
+  })
+
+  expect(projects.map(project => project.projectConfig.browser.headless)).toEqual([
+    headless,
+    !headless,
+  ])
+})
```

_test/e2e/test/config/browser-configs.test.ts, +19 −0. The largest hunk in the largest file._

## File map

**Every file this change touches, heaviest first.**

Role is inferred from the path and risk from the path and the line count. Neither was read from the code.

| File | Role | Change | Risk |
| --- | --- | --- | --- |
| `test/e2e/test/config/browser-configs.test.ts` | test coverage | modified, +19 −0 | low |

## Receipts

**Where each number above comes from.**

All of it is arithmetic over the file list and the check results, so it can be recomputed from the source.

- **Claim.** 1 files changed, +19 −0.
  - Evidence: test/e2e/test/config/browser-configs.test.ts (+19 −0)
  - Where: https://github.com/vitest-dev/vitest/pull/10851
- **Claim.** browser-configs.test.ts carries 100% of the changed lines.
  - Evidence: 19 of 19 changed lines
  - Where: test/e2e/test/config/browser-configs.test.ts
- **Claim.** It arrived as 1 commit.
  - Evidence: test(browser): cover instance headless overrides
  - Where: commit 0d4071d
- **Claim.** CI reports 1 failing of 30.
  - Evidence: Test: e2e, node-24, macos-latest
  - Where: CI check: Test: e2e, node-24, macos-latest
- **Claim.** The change drew 1 comment.
  - Evidence: ### <span aria-hidden="true">✅</span> Deploy Preview for *vitest-dev* ready! | Name | Link | |:-:|------------------------| |<span aria-hidd…
  - Where: comment by netlify[bot]

## Where to attack

**What the shape of this diff suggests looking at first.**

These come from structure alone: which areas were touched, what was not touched alongside them, and what CI says. None of them is a judgement about the code.

- **Test: e2e, node-24, macos-latest is failing** (high)
  - No summary was published for this check.
  - Mitigation: Read the check output before anything else here matters.

## Merge order

**A reading order for the review, not a deployment plan.**

Ordered by how expensive each part is to get wrong, which is a structural property rather than an informed one.

1. **Read the failing check first.** Test: e2e, node-24, macos-latest is red. Everything else is provisional until that is understood.
2. **Then browser-configs.test.ts.** The largest single file in the change, +19 −0.
3. **Finish with the tests.** 1 test file changed. Reading them last tells you what the author believed they were changing.

## What this brief could not check

- No language model read this change. Every statement here is computed from file paths, line counts, and CI status, so it describes the shape of the diff and not what the diff means.
