You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
A better way to verify immutability would be to recursively call Object.freeze on all inputs to all the functions in all tests. The nice thing about that approach is that if any tests inappropriately modify data, the stack trace will point to the exact source of the error. If we do that, we probably shouldn't need special immutability test cases at all. --@josephg
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: