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

Add JUnit5 and Kotest for plugin tests #400

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Conversation

jedesroches
Copy link
Contributor

This PR does a few things to allow using the JUnit5 test runner, and the JUnit5 and Kotest test frameworks.

JUnit 5

  • Add the tests { useJUnitPlatform() } command to tell gradle to run tests using the JUnit5 runner (c.f. JUnit5 architecture)
  • Add the testRuntimeOnly("org.junit.vintage:junit-vintage-engine") dependency to enable the JUnit5 runner to discover and run legacy (JUnit3/4) tests.

Kotest

  • Add the testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion") and testImplementation("io.kotest:kotest-property-jvm:$kotestVersion") dependencies to use the Kotest framework, for 1) PBT 2) nice syntax 3) nicer assertions on collections. See https://kotest.io

Test loggging

  • Add the testLogging { events = setOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED) } line to have feedback on passing/failing tests when running via gradle command-line (vs IntelliJ runner).

@jedesroches jedesroches self-assigned this Nov 9, 2023
Base automatically changed from fix/396-round-not-truncate to main November 16, 2023 08:15
Found some nice corner cases, like handling of e.g. PLUS_INFINITY or -0.0
@jedesroches jedesroches merged commit 4d937cb into main Nov 30, 2023
3 checks passed
@jedesroches jedesroches deleted the junit5-and-kotest branch November 30, 2023 14:22
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