Closed boroth closed 8 years ago
I only see my console.log when i explicitly add "mockApp" as a dependency to my app.js. I'm not sure where I should be including this dependency.
Figured it out, something was messed up with my jasmine/karma install.
Glad to hear it. I don't usually use grunt watchmock with actual automated tests. I usually use it when I'm manually testing or maybe with selenium tests that drive the browser, but I imagine it could work with those. With my automated tests, I'll usually mock closer to the test, like by injecting a fake service or something into the test that just returns some hardcoded json.
Disclaimer: I'm TERRIBLE at writing tests.
However, I'm trying to get better. I'm trying to test just with the samples you've given in mockApp.js, but it doesn't seem to be loading the
whenGET
interceptors? I'm not even sure this module is being loaded when my tests are being run, because I've added a console.log() into it and it's not spitting it out. I saw it one time, but haven't gotten it to run again.Just trying to have the following http request mocked when i run
grunt watchmock
:(this isn't the console.log i'm looking for, i added one to mockApp.js in the run block)