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

Support Decimal in scenario tests #6491

Merged
merged 8 commits into from
Oct 3, 2022

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Oct 1, 2022

Fixes #6429

We were converting Decimals to strings, and then comparing those to numbers. That doesn't work. Now we keep them as Decimals, which lets us compare them to numbers.

@esteban-url
Copy link
Contributor

this is a way cleaner solution to the types problem! passing in the type "metadata" is a great idea @Tobbe

Copy link
Member Author

Tobbe commented Oct 1, 2022

I had to come up with another solution for Decimal. Can't use a regexp to find Decimals that also doesn't match Float 🙂 And then I realized I could use the same solution for dates too.

@Tobbe Tobbe added the fixture-ok Override the test project fixture check label Oct 2, 2022
Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

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

Works locally and checks out with the Prisma docs!

@jtoar
Copy link
Contributor

jtoar commented Oct 3, 2022

@Tobbe this is ready to go on your end right? I can take care of merging it from here.

@Tobbe Tobbe enabled auto-merge (squash) October 3, 2022 21:06
@Tobbe Tobbe merged commit 38b5e80 into redwoodjs:main Oct 3, 2022
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Oct 3, 2022
github-actions bot pushed a commit that referenced this pull request Oct 3, 2022
Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
@Tobbe Tobbe deleted the tobbe-decimal-scenario-tests branch October 3, 2022 22:37
@jtoar jtoar modified the milestones: next-release, v3.2.0 Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixture-ok Override the test project fixture check release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug?]: Existing (passing) tests against services using jest's expect are now failing trying to match Date {}
3 participants