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 require-css #22

Open
famoroso opened this issue Dec 9, 2014 · 1 comment
Open

Failures with require-css #22

famoroso opened this issue Dec 9, 2014 · 1 comment

Comments

@famoroso
Copy link

famoroso commented Dec 9, 2014

Started getting failures after adding require-css to my project. Dug in with the debugger and figured out the problem.

require-css adds a link tag and then fires a callback when the css is actually loaded. The detection uses a load event callback if it thinks the browser supports it and polls otherwise. The logic is pretty simple, it prefers using the load event but polls with webkit and older versions. This seems to be fine for normal operation with firefox but fails in karma. For some reason the load event never fires. Hacking require-css to force it to poll got my tests green again.

So is there anything that can be done in the launcher or karma to fix this?

@lbesson
Copy link

lbesson commented Oct 16, 2015

FWIW I ended up writing a fake plugin that actually does nothing and changed requirejs config when running the test to using this fake plugin instead of require-css

(this is only ok if you don't care for css being really loaded)

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