Selfie: a new kind of snapshot testing library for Kotlin Multiplatform

Snapshot testing has been badly underused for three reasons:

  • controlling read vs write used to be cumbersome (fixed by control comments)
  • stale snapshots used to pile up (fixed by garbage collection)
  • a great test should tell a story, and disk snapshots can’t do that (kinda complicated, but we fixed that too)

Some friends and I just released 1.0 of a snapshot testing library called selfie (URL selfie.dev) written mostly in Kotlin Multiplatform, along with some jvm-only code for JUnit 4 & 5. I’ve been using it in production and it’s been a huge upgrade for us.

No one on our team has much experience with Kotlin multiplatform, we would love help getting it running with mocha and karma. Might be interesting to get it running with Kotlin/Native too.

4 Likes

It is a nice library :slight_smile: I hope some one help you.

1 Like