Selfie

object Selfie

Static methods for creating snapshots.

Functions

Link copied to clipboard
Link copied to clipboard
inline fun <T> cacheSelfieJson(noinline toCache: () -> T): CacheSelfie<T>

Memoizes any type which is marked with @kotlinx.serialization.Serializable as pretty-printed json.

Link copied to clipboard
fun <T> expectSelfies(items: Iterable<T>, toString: (T) -> String): StringSelfie
Link copied to clipboard
fun preserveSelfiesOnDisk(vararg subsToKeep: String)

Sometimes a selfie is environment-specific, but should not be deleted when run in a different environment.