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.and' failing with 'karma@0.13' #1498

Closed
AlexKVal opened this issue Jul 16, 2015 · 5 comments · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed

'should.and' failing with 'karma@0.13' #1498

AlexKVal opened this issue Jul 16, 2015 · 5 comments · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Assignees
Milestone

Comments

@AlexKVal
Copy link

This spec-code

var methodTest = sinon.stub();

methodTest('y');

methodTest.should.have.been.calledOnce
    .and.calledWith('y');

causes

✖ validates each validation
      Chrome 43.0.2357 (Mac OS X 10.9.5)
    TypeError: Cannot read property 'and' of undefined

with karma@0.13 version.

I've created simple project for bug repro:
https://github.com/AlexKVal/karma-test

master branch uses karma@0.13 and causes test fail
karma13 https://travis-ci.org/AlexKVal/karma-test/builds/71240835
screen shot 2015-07-16 at 3 12 23 pm

https://github.com/AlexKVal/karma-test/tree/karma12 branch uses karma@0.12 version and works fine
karma12 https://travis-ci.org/AlexKVal/karma-test/builds/71240954
screen shot 2015-07-16 at 3 05 59 pm

@dignifiedquire
Copy link
Member

Thanks for the report, will try to take look as soon as I can

@dignifiedquire
Copy link
Member

It looks like the underlying issue is the same as #1499. There is a conflict between the karma-chai and the karma-sinon-chai plugin. They both include a version of chai, and in 0.12 the addition from karma-sinon-chai simply won, but for some reason this broken now. You can work around it for now by removing karma-chai, which isn't needed anyway.

@AlexKVal
Copy link
Author

Thank you @dignifiedquire for the hint about karma-chai. 🍒
Indeed it helps with tests. ❇️

Now all is left to migrate react-bootstrap to karma@0.13 is #1497, which as I can see is also caused by the new file loading mechanic.

@dignifiedquire
Copy link
Member

Fix was released in 0.13.1

@AlexKVal
Copy link
Author

Thank you 🎉 🍒

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