# test\(web\): browser tests own their render with \`await using\` · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/ef249dd212ef5873951f9f63f3d2b90a1e30d8e9)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: ef249dd212ef5873951f9f63f3d2b90a1e30d8e9

Requested commit: ef249dd212ef5873951f9f63f3d2b90a1e30d8e9

Commit: ef249dd212ef5873951f9f63f3d2b90a1e30d8e9

Tree: 1b10743c9d96398e15266a9d7307eafea1f00716

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
test(web): browser tests own their render with `await using`

render() in apps/web/test/render.tsx now returns a screen that unmounts, removes its
container and drops its router on dispose, so a test acquires it with `await using`
and leaves nothing behind. The module-level screen array, cleanup() and every
lifecycle hook in the nine migrated files are gone; mock state the vi.mock factories
read is reset by a setup() call at the top of each test. fakeTimers() and
stubGlobal() cover the other per-test changes, and vitest-browser-react is no longer
needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [8b6062d2eea40cf5d08effa5fa13af5180b131e8](https://git.cafe/pingdotgg/t3code/commit/8b6062d2eea40cf5d08effa5fa13af5180b131e8?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/ef249dd212ef5873951f9f63f3d2b90a1e30d8e9?format=markdown)
