yearofmoo-articles / AngularJS-Testing-Article

A testing repository for AngularJS
263 stars 111 forks source link

switch to karma and upgrade to Angular 1.0.6 #3

Open kbowerma opened 11 years ago

kbowerma commented 11 years ago

This is a great article, however when I tried to run the test.sh I got an error that I should run karma instead of testacular. I loaded karma as a module (even though I had it global) and updated the Procfile.test to use the karma binaries. I then got: TypeError: Object [object Object] has no method 'resumeBootstrap' I found this: https://github.com/karma-runner/karma/issues/470 which said I need to run angular 1.0.6, so I dropped that over the top and ran minify and everything worked.

kule commented 11 years ago

I had loads of trouble when I tried to switch to karma (I'm new to node/npm/angular though so it might be just me!). I took the easier option of just downgrading to the earlier version of Testacular:

In package.json change "testacular" : "canary", to "testacular" : "0.6.1",

matsko commented 11 years ago

K. I'll get to it today. Thank you :)

swallentin commented 11 years ago

I've made some more changes. I removed the e2e web server and replaced it with changing the proxy routing for the e2e config. This allows developer to run ./scripts/test.sh using the same web server (test suite is untouched).

Initially I did this for another project I'm working on where we're using grunt to start up our server/service (yeoman) and I wanted all of the testing to be done against the same server. It worked out and my thought was perhaps this could be useful for others.

eddiemonge commented 11 years ago

should the blog article be updated to reference karma as well?

matsko commented 11 years ago

Everything will be updated over the weekend :)