-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(config): Add a clearContext config to prevent clearing of context #1356
feat(config): Add a clearContext config to prevent clearing of context #1356
Conversation
If and when merged, karma-jasmine (v0.1.5, jasmine-1_0 branch) adapter needs to support clearContext config. It should conditionally "memory clean up" only when clearContext is true. Memory clean up wipes out test (suite & spec) results and prevents Jasmine HTML reporter or any other reporter in a multi reporter set-up from receiving the result data.
|
I don't think this is good idea, but I don't fully understand the problem now. Thanks |
Jasmine Spec runner gives a user an interactive page of the test results and ability to single out a spec or suite. Karma executes tests and report the results always through the console or write to a static file through plugins. The motivation is ability to embed the Jasmine version 1.3 HTML Reporter into Karma to see the tests visually on the page with every run. VS To embed the Jasmine HTML reporter into Karma I added the jasmine css and jasmine-html reporter files to the files in the karma configuration.
Then I added the reporter to the jasmine environment so that jasmine reports to both html reporter and to Karma reporter in a multi-reporter setup.
When all this is setup and Karma is running and re-running the tests, I noticed that it clears the context iframe/window src to 'about:blank' wiping out the Jasmine HTML reporter results from the page. Additionally, karma-jasmine nullifies jasmine suite and spec data, preventing Jasmine reporter from ever receiving the results. The changes proposed take care of the above issues. Hopefully this makes more sense now and you are able to give better direction as how to proceed. Thanks Maksim! As a side note and out of the scope of this discussion, one minor issue remaining is that trying to single out a single suit and/or spec test to run with Jasmine HTML Reporter embedded in Karma. This works fine when on the 'DEBUG' window. In the main Karma window, the link points to /context.html?spec=The%20___%20module since it's in the iframe. |
@dignifiedquire no, but we rarely look at contex.html page in our projects when run test. Maybe it's useful/familiar for people who move from html reporter to karma. |
+1 I would like this option too as I use jasmine html reporter too. |
I think I'm getting around to merging this, if you could rebase onto the latest master please @cbayram |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
Thank you for your contribution. We detected an issue with your commit message though and would ask you kindly to fix it.
Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html and please do not hesitate to ask if you have any questions. This message was auto-generated by https://gitcop.com |
Enable a clearContext config which when set to false: - prevents clearing of context window upon completion of running of the tests. - always (re)sets up context regardless of errors This configuration is useful when embedding the Jasmine html reporter within the context window.
Ignore @GitCop, commit message is fine |
Thank you for your contribution. We detected an issue with your commit message though and would ask you kindly to fix it.
Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html and please do not hesitate to ask if you have any questions. This message was auto-generated by https://gitcop.com |
Looks like there are problems with the tests though |
I'm unable to run
|
Are you sure you referenced the correct issue? I'm doing all development on OS X and have all tests passing |
You need to run the whole |
Also travis is happy Oo, so just need you to sign the CLA I'm afraid |
CLAs look good, thanks! |
Thanks |
feat(config): Add a clearContext config to prevent clearing of context
Enable a clearContext config which when set to false:
This configuration is useful when embedding the Jasmine html reporter within the context window.