Closed pietschy closed 7 years ago
@pietschy Sounds like something in your tool chain is pulling in a newer version of the type-detect
package than is supported by Chai v3.5. The problem isn't reproduced using an otherwise empty project with Chai v3.5 installed. I bet using chai@canary
off npm will solve that problem. Otherwise gotta hunt down the type-detect
conflict.
Hi @meeber, that was it.
I'd used jspm install npm:chai --dev
and for some reason it wasn't finding type-detect
at runtime so I'd installed it manually to get it going.
Sweet relief. Thanks!
Hi there, I'm using 3.5.0 and am getting a very strange error.
I was trying to use the
members
assertion but was getting the errorAssertionError: expected [ 1, 2, 3 ] to be an array
. I tracked this down to line https://github.com/chaijs/chai/blob/3.5.0/lib/chai/core/assertions.js#L1556When trying
expect([1,2,3]).to.be.an('array')
and found that_.type(obj)
is returning"Array"
at https://github.com/chaijs/chai/blob/3.5.0/lib/chai/core/assertions.js#L170Very strangely, if I change test to
expect([1,2,3]).to.be.an('Array')
thetype
argument at line https://github.com/chaijs/chai/blob/3.5.0/lib/chai/core/assertions.js#L163 is stillarray
and the test still fails.Something very strange is going on and I'm completely baffled. Any ideas?
Other tool chain info: JSPM 0.17.x, Typescript 2.2