Closed mcanfield closed 6 years ago
Here is a debug log: https://gist.github.com/mcanfield/39ef9a0dec1fe6fca2e6a948789455a7
Hey,
Unfortunately it's a very generic error. Most probably you've named karma.conf.js incorrectly or the contents of that file are incorrect.
Suggest the general debug advice:
Let me know how you go.
Thanks
Hi @lathonez thanks for the reply. Unfortunately I did go through the general debug advice before posting the issue. I copy/pasted all the config files verbatim (only removing references to clicker
). The above gist has 2 log outputs, the first is from my setup the second is from lathonez/clicker
. Yours works, mine doesn't.
My general project structure is the same. All my template url's contain ./<template>.html
. To reduce complexity I've removed all specs from the suite except one. The only project config differences are in package.json
, but those are product dependencies so the differences are as to be expected. I do have a custom ionic webpack.config.js
, that shouldn't matter but I removed it temporarily anyway.
The Chrome instance that is launched contains my project file and specs under the webpack:// source. So karma is working up to that point. The only difference between mine and clicker
is that clicker
has its files successfully being served under the source ng://.
lathonez/clicker
files
mcanfield/project
files
Google also came back with the lamenting reply that this is a generic error. From looking through the karma
source code it's clear that the jasmine framework isn't overriding the default __karma__.start
global reference, causes the default function to spit out You need to include some adapter that implements __karma__.start method!
.
Since nothing jumps out at you I'll rinse and repeat a couple times and explore the track of why jasmine's karma.start function isn't overriding the default karma.start. Worse case, I'll start porting my app piece by piece into a working unit test setup.
Thanks again!
@mcanfield - can I pull clone the project and have a look or is it closed source?
@lathonez it is private source currently, but will one day be open source. If you have a gitlab account I can give you access, or email you a tarball. Sorry, been super busy last couple days. Thanks for offering.
Sorry I didn't get back to you. My (free) time only contributes to FOSS.
Happy to discuss contracting.
If you ended up solving this somehow, please share the solution!
Heya @lathonez no worries. It's only private right now due to how the agency develops software, it will by necessity be FOSS. If you knew who, you'd understand better. In any case, I did not find a resolution and have put the project on the back burner. Maybe things will magically start working once I fire it back up, or Ionic will finally treat testing as a first class citizen... now that's a thought 😃 ! In any case, thank you so much for the triage and follow up!
Hiya @lathonez,
I've followed your blog article for adding unit testing to a pre-existing Ionic project. I've copied the configurations and dependencies verbatim from the repo. When I try to
npm test
I get the following output:My package.json only differs in the additional dependencies my project requires. I've reinstalled everything multiple times. I've tried debugging to spot any noticeable issues. No luck thus far.
Do you have any troubleshooting tips for helping me solve this? Thanks!