-
Notifications
You must be signed in to change notification settings - Fork 16
Update to Kotest 6.1.0 and refactor to align with updated API changes. #559
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks very much for this implementation! Looks like you need to run I can update the changelogs myself, but I need an update to this file
The |
|
Spotless applied and docs updated. Let me know if you need further changes! |
|
I must be missing something locally as it has been green locally each time. Hopefully this last commit has it fixed on CI too. |
|
fwiw: selfie/.github/workflows/jvm-ci.yml Line 35 in e306baa
The build can be a bit finnicky, tests that run tests seem to hit edge cases in Gradle. |
|
Gotcha, no big deal if you don't mind hitting approve each time to run the tests :) |
|
I got it to fail locally now. |
polarene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm the reporter of #554 , great work, thanks!
| val coroutineLocal = CoroutineDiskStorage(DiskStorageJUnit5(file, testCase.name.name)) | ||
| return withContext(currentCoroutineContext() + coroutineLocal) { | ||
| file.startTest(testCase.name.testName, false) | ||
| file.startTest(testCase.name.name, false) | ||
| val result = execute(testCase) | ||
| file.finishedTestWithSuccess(testCase.name.testName, false, result.isSuccess) | ||
| file.finishedTestWithSuccess(testCase.name.name, false, result.isSuccess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expression testCase.name.name is repeated, could it be worth extracting a variable?
| file.startTest(it.key.name.name, false) | ||
| file.finishedTestWithSuccess(it.key.name.name, false, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for it.key.name.name.
| file.startTest(it.key.name.name) | ||
| file.finishedTestWithSuccess(it.key.name.name, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract it here too.
Kotest 6 was a major release with some small breaking changes to the API.
This PR updates the code and examples to reflect the changes.