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

chore: improv api testing #1109

Merged
merged 6 commits into from
Mar 21, 2022
Merged

chore: improv api testing #1109

merged 6 commits into from
Mar 21, 2022

Conversation

flea89
Copy link
Contributor

@flea89 flea89 commented Mar 14, 2022

Resolves #642

In this PR

  • flush DB at every test
  • expose DB utils so that we can share factories to populate DB from client packages
  • fixed a nasty bug where multiple results were returned from .single because of inconsistent versions of fetch. (one used in the APIs and the one used when calling a factory from tests). TL;DR accept header was sent twice and the second instance was ignored by PostgRest.
  • moved randomCid and, refactored to use Math.random

@flea89 flea89 added the topic/pot Issues handled by PT. label Mar 14, 2022
@flea89 flea89 requested a review from adamalton March 14, 2022 10:50
@flea89 flea89 marked this pull request as ready for review March 14, 2022 13:12
@flea89 flea89 merged commit 802d105 into main Mar 21, 2022
@flea89 flea89 deleted the feat/improv-api-testing branch March 21, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/pot Issues handled by PT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve set-up for API testing (for package/db)
3 participants