Skip to content

test(hub): isolate Vitest state and worker databases #111

Open

Description

Copilot

Hub contributors need clean, independent test cases while files run in parallel. Centralize reset of reusable test state before each case and remove redundant local cleanup hooks, retaining explicit disposal where tests own real resources.

Add a dedicated database-enabled server Vitest project. Only that project requires Postgres. Prepare the current Prisma schema before database tests run, provide isolated databases for each Vitest worker, and clear database records before every case. Tests arrange their own records, act, and assert. Protect developer databases from destructive cleanup and avoid collisions between simultaneous test runs. Document the test lifecycle and local/CI commands.

Implement as a separate PR stacked on #108. Browser and pure unit tests remain database-free.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions