Open curran opened 5 years ago
This is a good idea, but its worth noting that modifying something frozen with Object.freeze will only throw an exception in a strict context. I think this should be ok since the json1 library is in a strict context now we're using typescript; but I'm still slightly nervous that the tests might silently pass.
I've inlined a small fuzzer into test.js which uses this approach. (It should probably be moved out)
This issue is about improving the approach taken in the tests for checking immutability.
A quote from the original discussion of this idea in #8: