-
-
Notifications
You must be signed in to change notification settings - Fork 826
Remove randomness from addMockFunctionsToSchema #1231
Copy link
Copy link
Closed
Description
I would like to understand the reason why addMockFunctionsToSchema introduces randomness.
And
Those resolvers are the ultimate fallback if the user don't provide a mocked implementation. If the user forget to override them, random values are going to be sent in the tests.
I had a viewerPermission resolver that returned an enumeration: READ, WRITE . Because I forgot to override the resolver, my interface was rendered in read-only mode half of the time.
I think any test helper function should aim at consistency between two test run. Otherwise we get flaky tests and hard to debug problems. If users want random data, let them override the default implementation themselves.
Am I missing a reason why we need randomness in that file?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels