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

Failures with karma-firefox #180

Open
famoroso opened this issue Dec 9, 2014 · 4 comments
Open

Failures with karma-firefox #180

famoroso opened this issue Dec 9, 2014 · 4 comments

Comments

@famoroso
Copy link

famoroso commented Dec 9, 2014

Added require-css to a project where I was running karma unit tests with firefox, chrome and phantomjs. Firefox unit tests stopped working but everything else seemed fine including loading a standard deployment of my project in firefox. Dug in with a debugger and figured out the problem.

Seems that in karma-firefox the load event does not fire as expected. So even though the css is actually loading, the tests eventually end in a timeout error. Forcing useOnload to false fixed the problem.

Is there a smarter way to set that flag?

@guybedford
Copy link
Owner

Thanks for reporting - specifically is this Karma-Firefox or Firefox in general?

@famoroso
Copy link
Author

famoroso commented Dec 9, 2014

Seems to be only Karma-Firefox. Firefox loads everything up just fine outside of the unit test environment.

@guybedford
Copy link
Owner

Ok right. That's really strange it's specific to that scenario, as it's still just Firefox right? Any ideas why it might be happening would be great to hear. Do you think it makes sense to add an environment detection for this to switch into onLoad? I just worry it's not solving the issue though.

@famoroso
Copy link
Author

famoroso commented Dec 9, 2014

I only debugged as far as finding out about the onLoad. It's entirely possible that fixing Karma-Firefox or karma itself is a much better solution. I did post this on karma-firefox's github but haven't gotten a reply yet. I think if there's an easy way to detect that we are running karma unit tests then it's worth adding. Otherwise it's easy to patch for those who care.

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