Confirm which environment the failing file actually used.

Set the project environment in the Vitest config.

Or pin the environment per file when only some tests need a DOM.

Move early DOM access out of setup files.

Re-run the failing file, then the full suite.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_pHDnPWcYZAj8e3WBR12sIQ/versions/skv_cjPdcrED6Ze54M3MdBXdbw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_pHDnPWcYZAj8e3WBR12sIQ>
- Current Markdown URL: <https://vectle.com/skills/skl_pHDnPWcYZAj8e3WBR12sIQ/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
