-
Notifications
You must be signed in to change notification settings - Fork 18
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
Test cases don't actually run when using :js-env :chrome (or :firefox) #60
Comments
Thanks for the repo, there are probably a few things at play here, and the chief root cause is that the karma server is out of process and therefore async unlike phantom.
Tried a quick workaround for this:
For CI would need to tediously find a sufficient
The most straightforward solution could be for the boot process to indeed terminate, but to have written out the test files via So a point release fixing (1) and blocking on karma server calls is likely the way forward. Unfortunately I haven't had much time free to touch this library - you can see the neglected issues and PRs. Any help would be greatly appreciated! Otherwise, knowing now that there are actively affected users, I'll make a push in any case 🙂 |
Thanks for the detailed reply - on a weekend, no less! For now at least, it works just fine to run the tests in Phantom, but I'd love to help get this fixed so we can run our tests in the actual browsers that are representative of what our users have. Do you have a patch already for fixing Thanks for your help and please don't feel pressured to make time to work urgently on these things! |
Have published Suggest fiddling with Definitely amenable to PRs 😍 |
Closing this ticket as it's gone cold - please reconnect if you're still having issues! |
Afraid this is still happening with doo v0.1.8 using chrome headless |
Using 0.3.4 and appending |
(Thanks for reopening this @crisptrutski!) |
Also even adding
And when it succeeds:
I added |
(Years later...) You should probably not use any of this anymore, but if you can't switch to newer tools for some reason, it's worth noting that results differ depending on the compiler optimization parameter. I found that nothing ran with chrome-headless when the compiler :optimizations flag is set to :none (which is the default) but if you pass it as :advanced then the tests DO run. Based on the OP's example, you can get output like this:
I replaced :none with the :whitespace optimization instead, which supposedly just compresses spaces, newlines, and removes comments, and is thus the closest you can get to :none, and that worked as well. I have no idea why :none doesn't work; I was able to copy out the generated test suite files for both :none and :advanced, update the karma conf to my new paths, and re-run them manually using "karma run" without problems. They were only skipped when run directly through boot-cljs-test. (All I get when that example runs is a bunch of parse errors, but when it doesn't run I don't get any output from Karma at all.) Also note I did not need to add a After switching to cljs-test-runner I had none of these problems. Hope this helps somebody. |
When running the tests in Chrome or Firefox, the browsers open briefly, but no actual tests get executed. The same tests work just fine in PhantomJS.
Here's a small repo demonstrating the issue: https://github.com/SparkFund/cljs-test-problem, and here's the output I see when I attempt to run the tests in Chrome (latest Chrome, latest MacOS, problem can be reproduced by colleagues):
I attempted to inspect either the generated Karma config file or the contents of
generated_test_suite.out
but it appears those temp files get cleaned up post-haste and are no longer around to look at.As far as I know I'm using the most recent versions of all my deps. Please let me know if there's more I can do to help troubleshoot this, thanks!
The text was updated successfully, but these errors were encountered: