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 set-up for API testing (for package/db) #642

Closed
flea89 opened this issue Nov 17, 2021 · 0 comments · Fixed by #1109
Closed

Improve set-up for API testing (for package/db) #642

flea89 opened this issue Nov 17, 2021 · 0 comments · Fixed by #1109
Assignees
Labels
effort/quickwin kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up topic/devexp Developer experience improvements, onboard efficiencies, time savers. topic/pot Issues handled by PT.

Comments

@flea89
Copy link
Contributor

flea89 commented Nov 17, 2021

Improvements to make:

  • Flush DB at every test. There is currently no easy way to do this. It'd be quite useful to allow for an easy way to clear data in order to keep our tests nice and encapsulated.
    When & how?
    • Between different tests
    • Suites or every "describe" block
    • Should it be a custom decorator?
  • Expose DB utils so that we can share factories to populate DB from client packages
  • A nasty bug where multiple results are 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.
  • Move randomCid and, refactor to use Math.random
@flea89 flea89 added kind/enhancement A net-new feature or improvement to an existing feature need/triage Needs initial labeling and prioritization labels Nov 17, 2021
@atopal atopal added topic/devexp Developer experience improvements, onboard efficiencies, time savers. P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Nov 19, 2021
@dchoi27 dchoi27 added the topic/pot Issues handled by PT. label Jan 21, 2022
@mbommerez mbommerez changed the title Test setup improvement for package/db - Flush DB between runs Improve set-up for API testing (for package/db) Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/quickwin kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up topic/devexp Developer experience improvements, onboard efficiencies, time savers. topic/pot Issues handled by PT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants