Improve mock factories
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 18
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 555
Description
There's a conflict of interests right now with fixtures:
-
We want them to be semi accurate to generate mocks for the UI
-
We want them to always be idempotent to work in tests
While yes, you could technically achieve 1/2, its quite difficult if we want realistic mock data.
I think the solution here is to break it up, rename them to factories (thats what they are), and have fixtures inhereit from that with predetermined values. Whenever a test needs multiple variants of a fixture, it will be required to override it. That ensures we've got stable-ish fixtures.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Start by locating the current fixture implementations and their test usage, then determine how factories and predetermined fixtures should be separated; done means the proposed structure supports realistic UI mocks while keeping test fixtures stable and idempotent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100