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

"#<Assertion> is not a function" using assertions as functions in nodeJS #321

Closed
lucasrcosta opened this issue Dec 10, 2014 · 2 comments
Closed

Comments

@lucasrcosta
Copy link

I'm using Mocha in CLI. Since I'm linting the code I would need the following code to work:

it('can check ok', function() {
   var itsOk = 1;
   itsOk.should.be.ok();
});

but I get the error TypeError: Property 'ok' of object #<Assertion> is not a function

@keithamus
Copy link
Member

Sorry @lucascosta; we tried to get this working before (see #41, #297, #306) but it did not work out because it breaks compatibility with the plain getters.

Luckily there is a plugin for users who don't mind breaking the getters - @joshperry's dirty-chai

@lucasrcosta
Copy link
Author

Thanks for the reply. I'll keep it clean...

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

No branches or pull requests

2 participants