Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should there be support for a .frozen property? #13

Closed
astorije opened this issue Apr 21, 2015 · 3 comments
Closed

Should there be support for a .frozen property? #13

astorije opened this issue Apr 21, 2015 · 3 comments

Comments

@astorije
Copy link
Owner

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?

@zanuka
Copy link

zanuka commented Jun 15, 2015

yes, would be handy

@astorije
Copy link
Owner Author

astorije commented Jul 3, 2015

Alright, it's on the todolist then :-)

@astorije
Copy link
Owner Author

Well... I did it, and then I un-did it because it has just been added to Chai 3.1.0.

Please use this assertion then. Makes more sense to find it there anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants