Skip to content

test(frontend): recommendations.test.ts fails 6 tests under random ordering (order-dependent state) #803

Open

Description

@cristim

Found by the platform #801 gate (jest random-order run).

frontend/src/__tests__/recommendations.test.ts (path as reported; verify) fails 6 tests when jest runs with random ordering (--randomize / shuffled seeds), even when the file is run alone. It predates PR #801 and that PR does not touch it, so there is shared mutable state or an order dependency inside the file (module-level state, timers, or DOM left behind by a previous test).

To do

Reproduce with cd frontend && npx jest src/__tests__/recommendations.test.ts --randomize on origin/main using a few seeds; identify the leaking state; fix the tests (reset state in beforeEach/afterEach) so random order is stable; consider enabling randomization in CI once the suite is clean.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions