Skip to content

Releases: varabyte/truthish

v1.0.2

25 Nov 22:06
Compare
Choose a tag to compare

Changes

  • Added support for grouped assertions.
    • See notes below.
  • Added support for nodejs targets
  • Added assertion support for all array types
  • Added some methods to the map subject.
    • e.g. containsKey, doesNotContainValue, etc.

Notes

Grouped assertions

If you would like to check multiple assertions at the same time (meaning a failure won't be reported until all checks have run), you can use the assertAll function:

val person = Person("Alice", 30)
assertAll {
    that(person.name).isEqualTo("Bob")
    that(person.age).isEqualTo(45)
}
// The above will assert once, reporting both equality check failures

Full Changelog: v1.0.1...v1.0.2

v1.0.1

16 Apr 18:44
Compare
Choose a tag to compare

This release is identical to v1.0.0 but built with an older version of the Kotlin compiler so more projects can use it without running into compatibility issues.

Full Changelog: v1.0.0...v1.0.1

v1.0.0

12 Apr 21:59
Compare
Choose a tag to compare

This release is functionally identical to v0.6.5.

However, as nothing has significantly changed in the APIs for basically a year and I've been using Truthish in a bunch of projects no problem, I decided to bump the release up to 1.0.0.

v0.6.5

06 Mar 21:07
Compare
Choose a tag to compare
v0.6.5 Pre-release
Pre-release

📱 This release supports Android and iOS mobile targets. 📱

API-wise, it's identical to v0.6.4. But I needed to bump up the version to release a new top-level multiplatform artifact that includes mobile device targets as well.

v0.6.4

03 Mar 20:07
Compare
Choose a tag to compare
v0.6.4 Pre-release
Pre-release

🎉 🎉 This release supports Kotlin Native targets 🎉 🎉

Starting in 0.6.4, you can now declare Windows, Linux, or Mac multiplatform targets.

Discussing Kotlin / Native in detail is outside the scope of these release notes, but the README has been updated with some trivial examples for declaring them, and you can read the official documentation to learn more about Kotlin / Native development.

  • Additionally, the assertThrows method now accepts an optional message parameter, if you want to specify more detailed information. This can be useful, for example, if you call assertThrows in a loop, as without it, you wouldn't have any idea about which particular assertion failed:
///////////////////
// Before:

for (badName in badNames) {
   assertThrows<InvalidNameException> {
      Person(from = badName)
   }
}

// Output:
// An exception was not thrown
//
// Expected: class InvalidNameException

///////////////////
// After:

for (badName in badNames) {
   assertThrows<InvalidNameException>("The name \"$badName\" should have caused a failure but it succeeded") {
      Person(from = badName)
   }
}

// Output:
// An exception was not thrown
//
// Expected: class InvalidNameException
// Message: "The name "~~~" should have caused a failure but it succeeded"

v0.6.3

18 May 05:40
Compare
Choose a tag to compare
v0.6.3 Pre-release
Pre-release

A very minor release (a single bug fix, mainly), but thought I'd create it in preparation for releasing on maven central.

  • Fixed an issue with the in order asserter (contains(...).inOrder()) screwing up if there were multiple elements in the original list that equalled each other's values.
  • Updated Kotlin to 1.6.20
  • Tweaked build.gradle to enable me to publish on Maven Central

v0.6.2

04 Apr 20:45
Compare
Choose a tag to compare
v0.6.2 Pre-release
Pre-release

Truthish is now configured to generate JavaScript assets both for the new IR compiler format as well as the legacy version.

v0.6.1

01 Apr 23:28
Compare
Choose a tag to compare
v0.6.1 Pre-release
Pre-release

A minor release which fixes odd behavior when testing with sequences as the subject

v0.6.0

16 Sep 23:59
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

The initial release of trurthish.

At this point, you should be able to test about any project, but the tires haven't really been kicked by normal users much yet, so I hesitate to call it stable. It's possible some useful subjects or methods are missing, or that the output from some of them can use some massaging.

Once I've had a chance to use this in a few projects or maybe get feedback from the community, I'd be more confident bumping this up to a 1.0 release.