Since js.Dynamic.literal() != js.Dynamic.literal(),
what is the suggested way to test equality for two literals?
I don't want to characterize those literals with traits. I want to know if they are deeply equal.
What I'm doing right now is the following
val js1 = literal()
val js2 = literal()
val json1 = JSON.stringify(js1)
val json2 = JSON.stringify(js2)
assert(json1 == json2) // true
Note: even in javascript {} === {}
evaluates to false, so I shouldn't have been surprised in the first place.