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

Refactor to kotlin.assert and power-assert #173

Open
nomisRev opened this issue Sep 27, 2023 · 3 comments
Open

Refactor to kotlin.assert and power-assert #173

nomisRev opened this issue Sep 27, 2023 · 3 comments
Assignees
Labels
hacktoberfest Tickets belonging to hacktoberfest

Comments

@nomisRev
Copy link
Owner

nomisRev commented Sep 27, 2023

Rationale: https://jamesward.com/2023/09/20/asserttrue_test_dsls_legacy/

https://github.com/bnorm/kotlin-power-assert

Kotest shouldBe is not compatible with the required signature of power-assert, so we should refactor to kotlin.test.

@nomisRev nomisRev added the hacktoberfest Tickets belonging to hacktoberfest label Sep 27, 2023
@tibtof
Copy link
Contributor

tibtof commented Oct 17, 2023

Hi Simon, does this mean replacing kotest altogether or just refactoring the assertions?

@nomisRev
Copy link
Owner Author

Hey @tibtof,

Thank you for your interest in the project!

We only need to refactor from Kotest assertions to Kotlin-test assertions to get the benefits of kotlin-power-assert. The rest can stay Kotest.

@tibtof
Copy link
Contributor

tibtof commented Oct 23, 2023

Hey Simon, I created a PR with an example. I will continue with the rest of the tests if it's the right direction.
However, some assertions are still better in kotest, such as .shoulfBeRight. I would keep the assertions from kotest that also extract a value.
Here is an example result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Tickets belonging to hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants