Copy this bookmark:



description:


tags:



bookmark detail

Twitter
I’ve started writing functions that “diff” two values to return a nicely formatted description of their differences to use in test failures.

e.g.

let a = M(id: “A”, foo: “bar”)
let b = M(id: “B”, foo: “baz”)
diff(a,b) == “””
• id: “A” != “B”
• foo: “bar” != “baz”
“””

— Matt Diephouse (@mdiep) February 3, 2020
FavoriteTweet  mdiep 
8 weeks ago by mjtsai
view in context