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

'true' is not a function #74

Closed
benmosher opened this issue Dec 17, 2014 · 4 comments
Closed

'true' is not a function #74

benmosher opened this issue Dec 17, 2014 · 4 comments

Comments

@benmosher
Copy link

I am executing:

expect(id('signInContainer').isDisplayed()).to.eventually.be.true();

..which results in:

TypeError: Property 'true' of object [object Object] is not a function

The assertion executes properly if true is not called (i.e. drop the parens), but results in linting issues (see true, ok, etc.).

The original Chai behavior of allowing the getter to return a function appears not to be preserved.

@domenic
Copy link
Collaborator

domenic commented Dec 17, 2014

Indeed, you must use .true.

@domenic domenic closed this as completed Dec 17, 2014
@benmosher
Copy link
Author

Is it not possible to match the core Chai behavior of returning a chainable method? I'm not very familiar with the plugin arch, but I suspect it is.

@domenic
Copy link
Collaborator

domenic commented Dec 17, 2014

That Chai behavior was reverted in Chai.

@benmosher
Copy link
Author

Ah, sure enough: chaijs/chai#306. Still present in my npm-installed module from yesterday, notably.

Thanks for your time.

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