Chai: expect('test').to.have.lengthOf.above(2) throws Error

Created on 24 Aug 2017  路  2Comments  路  Source: chaijs/chai

Chaining lengthOf.above(N) does not work as expected. Also des example from the docs throws the following error:
TypeError: expect(...).to.have.lengthOf.above is not a function

Tested with string and array:
expect([1, 2, 3]).to.have.lengthOf.above(2);

Examples from here: http://chaijs.com/api/bdd/#method_above

Most helpful comment

ahw you'r right, I was still with version 3.5. Thank you!

All 2 comments

Hey @abimelex thanks for the issue.

Seems to work fine for me: https://runkit.com/embed/h8fea13a73d8

Are you running the latest version of chai (4.1.1)?

I'll close this for now - as I'm unable to reproduce; but if you can provide us with a reproducible error then we'll re-open this and try to fix it!

ahw you'r right, I was still with version 3.5. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

endymion00 picture endymion00  路  3Comments

zzzgit picture zzzgit  路  3Comments

jockster picture jockster  路  4Comments

AnAppAMonth picture AnAppAMonth  路  3Comments

corybill picture corybill  路  4Comments