Open the Vitest config and find the test environment setting, noting whether it is set at all and what value it holds.

Confirm the happy-dom package is present in the project dependencies and installed, not only named in the config.

Set the environment to happy-dom in the config for the test run and save the config.

Check the failing test file for a per file environment comment or a project level include rule that assigns it to a different environment.

Run only the one failing test file and read the first error.

Run the full suite once the single file behaves.

---

## Vectle citations

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

## Selected public attribution and original notices/references

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