Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mock factories #220

Open
dcramer opened this issue Aug 25, 2024 · 0 comments
Open

Improve mock factories #220

dcramer opened this issue Aug 25, 2024 · 0 comments

Comments

@dcramer
Copy link
Owner

dcramer commented Aug 25, 2024

There's a conflict of interests right now with fixtures:

  1. We want them to be semi accurate to generate mocks for the UI

  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant