Releases: kotest/kotest
v5.9.0
New Features
- Support for WebAssembly (the wasmJs target) has been added (#3805)
Breaking Changes
- Support for watchosX86 and iosArm32 targets has been removed (#3805)
Requirements
- Kotlin 1.9.23 and higher
- kotlinx.coroutines 1.8.0 and higher
What's Changed
- Add wasmJs target by @OliverO2 in #3805
- fix(docs): indentation in System Extensions by @craigpastro in #3940
- Change Arb.filterIsInstance() signature to use single type parameter by @kshired in #3943
- Add missing functions to property-arbs docs by @snowe2010 in #3945
- Increasing JVM heap allowance on GitHub by @Kantis in #3948
- Fix JS and Wasm/JS test timeouts, bring back Node.js test output by @OliverO2 in #3953
- add-similarity-to-contains-draft (#42) by @AlexCue987 in #3906
- Update Sonatype snapshot URL by @aSemy in #3956
- Fix json assertions artifact coordinate in docs by @TWiStErRob in #3968
- Create CODE_OF_CONDUCT.md by @sschuberth in #3987
- Restructure Kotlin/JS and Kotlin/JS/Wasm testing, fix #3329 by @OliverO2 in #3954
- Correct Collection Matchers Documentation For
collection.shouldContainAllInAnyOrder()
by @u-ways-e in #3995 - chore(deps): update plugin com.gradle.enterprise to v3.17.2 by @renovate in #3990
- Add kotlin-faker to extensions list by @serpro69 in #3971
- Better assertion failures for containJsonKeyValue by @Kantis in #3949
- fix(deps): update dependency io.github.classgraph:classgraph to v4.8.172 by @renovate in #3957
- Add similarity to contain exactly in any order by @AlexCue987 in #3938
- Fix Arb.list failing within edge cases in case of null values by @oliverblaha in #3982
- chore(deps): update plugin kotlinbinarycompatibilityvalidator to v0.14.0 by @renovate in #3993
- chore(deps): update plugin io.kotest.multiplatform to v5.8.1 by @renovate in #3992
- fixing the kotest autoscan warning message to reference the right property name by @stepanv in #4000
- fix(deps): update dependency io.projectreactor.tools:blockhound to v1.0.9.release by @renovate in #3989
- Allow comparison between empty set and other iterables by @Kantis in #4005
- Moving similarity feature to kotest-assertions-core by @Kantis in #4006
New Contributors
- @craigpastro made their first contribution in #3940
- @snowe2010 made their first contribution in #3945
- @TWiStErRob made their first contribution in #3968
- @u-ways-e made their first contribution in #3995
- @serpro69 made their first contribution in #3971
- @stepanv made their first contribution in #4000
Full Changelog: v5.8.1...v5.9.0
v5.8.1
What's Changed
- Update dependency io.github.classgraph:classgraph to v4.8.164 by @renovate in #3751
- Non-negative/positive
Long
assertions and property testers by @RusticFlare in #3720 - Fix typo in documentation by @tamj0rd2 in #3756
- fixed : rolled back to initial Readme.md by @mirageoasis in #3757
- Add context container to behavior spec by @jcthenerd in #3737
- Fixed display of large ranges by @sksamuel in #3765
- Expose the kotlin coroutineTestScope by @sksamuel in #3769
- Increase maps diff size to 100, allowing for config by @sksamuel in #3767
- Allow display name formatter to return null by @sksamuel in #3764
- CoroutineDispatcher is not a TestDispatcher on JS by @sksamuel in #3766
- Use evals as measure for assumptions by @sksamuel in #3771
- Added tier3 targets #3748 by @sksamuel in #3761
- Add size matchers to typed Kotlin array classes by @obecker in #3773
- Regular file passes the shouldBeEmptyDirectory() assertion by @sksamuel in #3775
- OffsetDateTimeToleranceMatcher (#6) by @AlexCue987 in #3781
- Add FixtureMonkey in third party extensions by @seongahjo in #3782
- Local date time plus or minus by @AlexCue987 in #3779
- Fix orNull with nullProbability=1.0 produce non-nulls by @kshired in #3783
- Fix continually does not work with null values by @kshired in #3786
- cutting docs for 5.8 by @Kantis in #3787
- Support binding properties to specific Arbs when doing reflective binding by @Kantis in #3358
- Plus or minus for zoned date time draft (#8) by @AlexCue987 in #3785
- Plus or minus for instant draft (#7) by @AlexCue987 in #3784
- Fix race condition in beforeSpec by @sksamuel in #3763
- Provide overriddable defaults for eventually by @sksamuel in #3788
- cutting docs for 5.8 (right this time) by @Kantis in #3791
- Fix compiler plugin for K2 compiler by @OliverO2 in #3800
- Local time plus or minus take2 by @AlexCue987 in #3802
- docs: fix EnabledCondition example (interface, not class) by @jhult in #3810
- Update inspectors.md - Fixed a typo by @karuturi in #3811
- Fix
BigDecimal.ZERO.shouldBePositive()
returning true by @pubiqq in #3814 - Add
intersect
matcher to ranges by @AlexCue987 in #3792 - tiny doc fix by @fantayeneh in #3823
- fix: Path.shouldBeAFile should fail on non-existant files by @LeoColman in #3826
- Add
shouldNotBePositive
andshouldNotBeNegative
matchers for BigDecimal by @pubiqq in #3818 - Support
Iterable
inwithData
on root level by @obecker in #3831 - Added java.time.Year arbitrary support by @kshired in #3842
- Added java.time.Year supports for reflective arbitrary bind by @kshired in #3844
- Have upper bound print violations by @AlexCue987 in #3847
- ContainDuplicates should print them (#20) by @AlexCue987 in #3846
- Should contain exactly in any order count mismatch draft (#19) by @AlexCue987 in #3845
- Replace Range Intersect tests with Property Tests by @AlexCue987 in #3824
- Changing the Kotlin Gradle plugin dependncy to compileOnly by @Kantis in #3856
- Publishing JVM jar and pom in root variant by @Kantis in #3859
- Fixing Arb.localDate when minDate == maxDate by @Kantis in #3860
- fix(deps): update dependency io.mockk:mockk to v1.13.9 by @renovate in #3853
- Add selfie snapshot testing to the extensions listing by @nedtwigg in #3870
- Contains in order more details (#29) by @AlexCue987 in #3871
- Fix maxDate not being generated by Arb.localDate() by @oliverblaha in #3876
- print-duplicates (#33) by @AlexCue987 in #3883
- document-plusOrMinus-for-temporals (#34) by @AlexCue987 in #3885
- Add selfie snapshot testing to the versioned docs pages by @nedtwigg in #3887
- override suspend fun beforeTest (#36) by @AlexCue987 in #3892
- Creating a PR base workflow that shall be mandatory by @Kantis in #3893
- Fix the snapshot version badge in index markdowns by @graceful-martin in #3888
- add support for SortedSet and add test accordingly by @mirageoasis in #3873
- Have upper bound failure with more detail (#32) by @AlexCue987 in #3882
- ShouldExistInOrderTest.kt (#30) by @AlexCue987 in #3872
- Remove unnecessary delay when retry and fix error message by @kshired in #3891
- more detailed failure for startWith and endWith by @AlexCue987 in #3886
- Refactoring CI workflow by @Kantis in #3897
- Quote expected and actual exception messages in assertions by @sschuberth in #3894
- Preserving original failure when short-circuiting eventually by @Kantis in #3864
- Update dependency io.github.classgraph:classgraph to v4.8.165 by @renovate in #3816
- comparing Maps, find keys similar to missing (#27) by @AlexCue987 in #3866
- Contains in order more details draft (#43) by @AlexCue987 in #3907
- Added IPAddressV6 arb by @kshired in #3905
- Add includeFirst option to EventuallyConfiguration by @kin4496 in #3904
- Update dependency io.mockk:mockk to v1.13.10 by @renovate in #3902
- Update dependency com.jayway.jsonpath:json-path to v2.9.0 by @renovate in #3903
- implement beWithin for ClosedRange and OpenEndRange by @AlexCue987 in #3839
- Make
shouldBe expected
equivalent toshould be(expected)
for non-matcher objects by @pubiqq in #3827 - Framework should handle stack traces not being available by @sksamuel in #3916
- add search for similar items to containAll by @AlexCue987 in #3909
- Do not allow TestConfiguration::tags after spec is initialized by @sksamuel in #3919
- Rename unresolved test config and allow passing into test methods by @sksamuel in #3917
- Arb.distinct() should work for edgecases by @sksamuel in #3920
- specify module name kotest-assertions-json by @jlous in #3898
- Using NoSystemOutListener prevents single tests from being executed by @sksamuel in #3923
- Fix information printed by KProperty0.shouldHaveValue (#3908) by @gianninia in #3921
- withEdgecases should keep shrinker #3812 by @sksamuel in #3922
- Fix TestWithConfigBuilder#config using parsed name when clear TestDslState by @kshired in #3798
- Proper fix for DescribeSpec test with a multiline description by @sksamuel in #3926
- Allow equals comparison of BigDecimals with different scales by @sksamuel in #3924
- Fixed use of type alias in shouldBeEqualToComparingFields by @sksamuel in #3927
- Don't consider kotlinx and javax types to be builtin by @Kantis in #3899
New Contributors
- @tamj0rd2 made their first contribution in #3756
- @mirageoasis made their first contribution in #3757
- @jcthenerd made their first contribution in #3737
- @seongahjo made their first contribution in #3782
- @jhult made their first contribution in #3810
- @karuturi made their first contribution in ht...
v5.8.0
What's Changed
- Remove hardcoded emil path by @sksamuel in #3700
- Fix until timeout by @sksamuel in #3699
- Improve documentation on beforeEach, beforeAny and beforeTest by @pientaa in #3698
- Update docusaurus monorepo to v2.4.3 by @renovate in #3713
- Update dependency io.kotest.extensions:kotest-extensions-mockserver to v1.3.0 by @renovate in #3715
- Add range to reflective Set of Enum values by @tbvh in #3710
- Fix ordering of beforespec and user interceptors by @sksamuel in #3716
- Add backgroundScope in KMP #3708 by @sksamuel in #3717
- Support objects when using FQN for config by @sksamuel in #3718
- Add see-difference formatting to shouldHaveValue by @matejdro in #3707
- assertions.nondeterministic: Update package name in docs and tests by @OliverO2 in #3727
- Added shouldBeSortedDescending matcher by @kshired in #3721
- Add warning about kotest.assertions.collection.enumerate.size property by @matejdro in #3724
- Fixed containAll Matchers with varargs by @kshired in #3731
- Fixed shouldContainAnyOf matchers with varargs by @kshired in #3733
- docs(tags.md) - update code snippet to pass env vars to jvm by @k-times-c in #3729
- support-ranges by @AlexCue987 in #3735
- Fix TestFactory does not close AutoCloseable objects by @kshired in #3739
- Added support for sequence arbitraries by @kshired in #3719
- Improve Sequence.shouldContainExactly(...) by @obecker in #3743
- Improve Sequence.shouldHaveSingleElement(...) by @obecker in #3745
- Added support for array arbitraries by @kshired in #3728
- Fix using IrFactory's deprecated api by @kshired in #3750
New Contributors
- @k-times-c made their first contribution in #3729
- @AlexCue987 made their first contribution in #3735
- @obecker made their first contribution in #3743
Full Changelog: v5.7.2...v5.8.0
v5.7.2
v5.7.1
Fix timeout detection when withTimeout wraps a blocking job (#3675) * Fix timeout detection when withTimeout wraps a blocking job This is a workaround for kotlinx.coroutines/issues/3875. Fixes #3672 * Add timeout tests --------- Co-authored-by: Sam <sam@sksamuel.com>
v5.7.0
v5.6.2
5.6.2 May 2023
Assertions
Property testing
- Fixes a problem with property testing on Apple platforms #3506
- Reverts behaviour of
Arb.string()
to only generate Strings of printable ascii characters- 5.6.0 changed it to include some control characters, see #3513 for details
- Fix huge allocation for OffsetDateTime Arb without arguments by @rescribet in #3491
- Fix Arb.map edgecases by @myuwono in #3496
Documentation
- Update writing_tests.md by @erikhuizinga in #3497
- Update shouldBeEqualToComparingFields doc by @ktrueda in #3416
Other
- Build Kotlin/Native library for ARM64 on Linux by @charleskorn in #3521
⚠️ Reverted behavior of Arb.string()
With Kotest 5.6.0, Codepoint.ascii()
was changed to include a wider range of ascii chararacters, and Codepoint.printableAscii()
was introduced with the historic range used by Codepoint.ascii()
.
Arb.string()
has been using Codepoint.ascii()
as it's default for generating chars for the string. This caused issues for some users, and we decided to revert Arb.string()
to the historic behavior by changing the default to the new Codepoint.printableAscii()
.
Hopefully this doesn't cause any issues for you. If it does, you can revert to the 5.6.0 ~ 5.6.1 behavior by using Codepoint.ascii()
explicitly.
If you added explicit usage of Codepoint.printableAscii()
to circumvent the issue, you can safely remove the explicit parameter starting with Kotest 5.6.2.
New Contributors
- @rescribet made their first contribution in #3491
- @ktrueda made their first contribution in #3416
- @erikhuizinga made their first contribution in #3497
Full Changelog: v5.6.1...v5.6.2
v5.6.1
Maintenance release, published since 5.6.0 failed to upload for some targets.
Breaking changes (from 5.5.5 -> 5.6.x)
- Moved
ConstantNow
-related functions to a new module namedio.kotest:kotest-extensions-now
(remember to add -jvm suffix for Maven)- Add this module as a dependency to keep using
withConstantNow
- Add this module as a dependency to keep using
- Remove Iterable checking logic from IterableEq (#3420)
See full changelog at https://kotest.io/docs/changelog.html
v5.6.0
Breaking changes
- Moved
ConstantNow
-related functions to a new module namedio.kotest:kotest-extensions-now
(remember to add -jvm suffix for Maven)- Add this module as a dependency to keep using
withConstantNow
- Add this module as a dependency to keep using
- Remove Iterable checking logic from IterableEq (#3420)
See full changelog at https://kotest.io/docs/changelog.html
v5.5.5
- Support coroutineTestScope globally (#3383)
- Improved double and float tolerance messages (#3355)
- Nested Data Driven Tests is not displayed as nested in Intellij #3341
- Fixed writing seeds when test name contains a colon on windows (#3304)
- withClue() fails with EmptyStackException if a coroutine switches threads #2447
- Use TestDispatcher inside beforeInvocation callbacks (#3363)
- Make checkCoverage checking against provided pairs (#3344)
- Kotest runner junit5 jvm has vulnerable transative dependency CVE-2021-29425 #3364
- Fix sequence matchers for constrained sequences (#3336)
- Print full path in JunitXmlReporter when useTestPathAsName is enabled instead of just leaf and first parent #3347
- Support { } lambdas as lazy clues (#3348)
- Use 'language injection' on assertions, so embedded languages are easier to use in IntelliJ #2916
- Removing default location for htmlReporter and using the default value from the constructor (#3306)
- Arb.bigDecimal should generate decimals which terminate with all kinds of terminal digit #3282
- Check enums using equals method instead of scanning their properties (#3291)
- Add BlockHound support (#3308)
- Matchers return this. (#2945)
- Added shouldMatchResource, shouldNotMatchResource matchers (#2945)
- Added matchExactly matcher for Maps #3246
- Fix dumping config when systemProperty set to true (#3275)
- Returning the original failure when ErrorCollector has only collected a single failure (#3269)