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

Fixed problem with window.__karma__.loaded undefined #16

Closed
wants to merge 3 commits into from

Conversation

jrobison153
Copy link

There's a race condition that makes the load and execution of cucumber tests very flakey. The majority of the time the tests fail to load with error 'window.karma.loaded() undefined'. I've managed to resolve the issue, well at least it works for me now. I had to remove all overloading of the karma__loaded() function, this seemed wrong. As far as I can tell from my research a karma framework should only implement __karma.start, that's it.

The second change was to stop calling start() after the adapter was loaded. Calling start() is Karma's job and doing so in the actual framework code seemed to confuse Karma.

Note, I've been running the fixed build against my code without issue now, everything looks good. However, the cucumber/karma tests in this project hang, they start and load but never execute. Not ideal I know, hoping you can take a look and make any final tweaks to get the build back to green.

this fixes #9

@jrobison153
Copy link
Author

need to revise solution

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

Successfully merging this pull request may close these issues.

test runs fail randomly, unable to execute the karma-loaded function
1 participant