-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Karma Test Error: $$sanitizeUri must define $get method #180
Comments
What versions of angular and angular-sanitize are you using? Current version of hottowel is using version 1.5.3 for both of them. From my understanding, the issue may be the case of miss-match versions of angular and angular-sanitize. |
I am using angularjs 1.5.5 and angular-sanitize 1.5.5 Here is some bits of my "dependencies": {
"jquery": "^2.1.4",
"angular": "1.5.0-rc.1",
"angular-sanitize": "^1.4.5",
"bootstrap": "^3.3.5",
"extras.angular.plus": "^0.9.2",
"font-awesome": "^4.3.0",
"moment": "^2.10.3",
}
...
"resolutions": {
"angular": "1.5.5"
}, |
I was able to recreate a similar error with a custom provider without a $get method. Check bower_components/angular-sanitize/angular-sanitize.js and see if it has a $get method. You may even want to try reinstalling angular and angular-sanitize. bower uninstall angular angular-sanitize
bower install One thing to note, from the looks of it you may not be using the current version of hottowel, |
I actually tried to use different versions of angular and angular-sanitize, event reinstalling it but still I got the same error. This must be really an issue in angular at #13794. Yes my hottowel version is not the current version. Is there a way to update it without breaking my project? |
Not sure if this is the best way to update without messing your current project, but after you update the generator with One thing to note, the current version hottowel uses jscs for validating your code style, so you may generate quite a few errors with your code if it's not styled a certain way (it will tell you what you need to change). Or you could try just uninstall all node and bower dependencies and and reinstall with the current node and bower files in hottowel with the correct versions. For a quick reference, you can compare your package.json and bower.json with the current version of hottowel at the following links. https://github.com/johnpapa/generator-hottowel/blob/master/app/templates/_package.json I personally would probably go the update the generator route, just so you have a clean slate with hottowel, and testing works in the current version with all associated dependencies. |
Issue details
I created a sample test for my controller but I keep getting this error
controller.js
I tried a simple test
spec.js
Please specify which version of
generator-hottowel
, node and npm you're runningAffected platforms
Which gulp command are you running ?
I tried it with
gulp test
orkarma start
. Even created intelliJ Runner, still the same results.The text was updated successfully, but these errors were encountered: