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
I found myself in the need to test if an object was frozen.
Right now, one has to do:
expect(Object.isFrozen(obj)).to.be.true;
which is not very pretty. I came up with a simple helper to allow the following syntax:
expect(obj).to.be.frozen;
I am not sure if this helper should be part of this project. On one end, it's not using Immutable, but on the other end, Object#freeze() is the closest we have to immutable objects in JS...
So, should I include it here? Any other suggestion?
The text was updated successfully, but these errors were encountered:
I found myself in the need to test if an object was frozen.
Right now, one has to do:
which is not very pretty. I came up with a simple helper to allow the following syntax:
I am not sure if this helper should be part of this project. On one end, it's not using Immutable, but on the other end,
Object#freeze()
is the closest we have to immutable objects in JS...So, should I include it here? Any other suggestion?
The text was updated successfully, but these errors were encountered: