Got any handy assertion functions for comparing JS...
# atrium
k
Got any handy assertion functions for comparing JSON documents?
r
Not yet, but there have been similar questions already, I'll open an issue for it
What is your opinion on unexpected data?
k
for the use case I'm working on at the moment, I do want to assert that the two documents are equivalent, so unexpected data should be a fail.
r
I see, and you are looking for something like:
Copy code
assert(json).isJson(doc)
right?
k
yeah
r
ok, two different use cases, I'll write that down. Thanks for your input 🙂
👍 1
What about the order of values in arrays?
The more I think about it the more I would say should be
in order
per default
k
Array order is important! Object property order doesn't matter to me here, which I think is going to be the common case.
👍 1