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

shouldEqualJson in Strict mode should compare raw values #2458

Closed
Tracked by #2226
Kantis opened this issue Sep 3, 2021 · 0 comments · Fixed by #2464
Closed
Tracked by #2226

shouldEqualJson in Strict mode should compare raw values #2458

Kantis opened this issue Sep 3, 2021 · 0 comments · Fixed by #2464
Labels
enhancement ✨ Suggestions for adding new features or improving existing ones.
Milestone

Comments

@Kantis
Copy link
Member

Kantis commented Sep 3, 2021

Which version of Kotest are you using
4.6.2

The following two tests currently fail using the default comparison mode CompareMode.Strict. Imo CompareMode.Strict should simply compare the value as a string and presence of quotation.

      test("comparing doubles") {
         "3.123456789123457" shouldNotEqualJson "3.123456789123456789123456789"
      }

      test("comparing int and float") {
         "3.2" shouldNotEqualJson "3"
      }
@sksamuel sksamuel added this to the 5.0 milestone Sep 18, 2021
@sksamuel sksamuel added the enhancement ✨ Suggestions for adding new features or improving existing ones. label Sep 18, 2021
@sksamuel sksamuel mentioned this issue Sep 18, 2021
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ Suggestions for adding new features or improving existing ones.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants