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

Start to fix tests + add more factories #334

Merged
merged 10 commits into from
Apr 1, 2021

Conversation

rofreg
Copy link
Contributor

@rofreg rofreg commented Mar 31, 2021

Part of #330 – this gets more tests passing, though not yet all. There's still more work to be done to either (1) make the factory data look exactly like the old fixtures, or (2) update the tests to use more dynamic factory data instead of assuming hard-coded values from fixtures.

Apparently npm run migrate:reset interacts poorly with Postgres, and effectively corrupts the connection of the running dev server such that you have to restart it. As a result, running npm run migrate:reset between each test was causing lots of problems.

@vercel
Copy link

vercel bot commented Mar 31, 2021

@rofreg is attempting to deploy a commit to the team-sendou-ink Team on Vercel.

A member of the Team first needs to authorize it.

cypress/support/index.ts Outdated Show resolved Hide resolved
@Sendouc
Copy link
Owner

Sendouc commented Apr 1, 2021

For file naming camelCasing so prisma/factories/plus_status.ts -> prisma/factories/plusStatus.ts

Once we get this merged I can fix the existing tests. The Plus Server side of the site has a bunch of edge cases anyway so I think it might be hard to figure out what's going on for someone else.

Still a fan of this though! It's nice once we get some more dynamic seeded data.

prisma/seed.ts Show resolved Hide resolved
Copy link
Owner

@Sendouc Sendouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! 🦖

@rofreg rofreg requested a review from Sendouc April 1, 2021 20:19
@Sendouc Sendouc merged commit 15ff99b into Sendouc:main Apr 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants