-
Notifications
You must be signed in to change notification settings - Fork 10
Fixes error where app module fails to load in testing #4
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
Conversation
@bsouthga Ready for review. I've included checkboxes on the PR to test on your machine. |
Hey kel, thanks for the PR! really appreciate your detailed description of the issue + your fix. I merged in a travis hook to test this with our CI setup and it seems to fail (as there is no headless chrome available, the one advantage of Phantom) -- any thoughts on a fix for this? We would love to keep the ability to run the automated tests if possible. |
2f0ebba
to
a813859
Compare
New Changes@bsouthga I've added two commits recently:
Additional Testing
I'll look into configuring TravisCI for running Chrome. Thanks for bringing this up. 👍 |
57389ff
to
6a3c5e0
Compare
@bsouthga 🎱 says that it's now passing. I squashed those changes on |
When calling `module()` with `inject()`, an error is thrown: ``` Error: [$injector:modulerr] Failed to instantiate module ng due to: TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply') ``` PhantomJS is not amongst Karma's officially supported browsers. In 1.x, `Function.prototype.bind` isn't defined. Instead of polyfilling, or using Phantom 2.x, it is better to stick with supported browsers. (In addition, TravisCI has been reconfigured to run Chrome.) READ MORE: http://blog.500tech.com/setting-up-travis-ci-to-run-tests-on-latest-google-chrome-version/
The matcher, `toThrowError()` is valid only in Jasmine, and not Mocha. Managing multiple competing test frameworks is not ideal. Therefore, I have configured all karma config files to use Jasmine only.
6a3c5e0
to
8ae6684
Compare
Looks good to me! |
Summary
Tasks
git push origin --delete fixes_ng_module_error_phantomjs_upgrade
Testing
./node_modules/.bin/gulp test-src
. Is the test passing?