-
Notifications
You must be signed in to change notification settings - Fork 135
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 tests fail when testing implementation with @Page annotation #58
Comments
Not at all, I appreciate you raising over here for a couple of reasons:
What you've pasted looks legit. I take it you've seen / tried to implement the example test of @page here? If not, give it a go / see also #41 If you've already tried this, I'm gonna need to see source code for the page and the spec if I'm going to be of any use. |
Yes, I've tried implementing your example. Let me see how I can share the code with you - it is currently on a private github project. I will get back to you soon. Thanks for your help! |
Presumably if you just clone down the repo, install and test it works? |
Yes, I can run the clicker app and its tests. There is a dependency (gulp-util) missing when trying to run the tests straight after npm install. I will submit another issue for that. |
Just as an update, I'm working on a public seed that I can share with you this week! Sorry for the delay and thanks for your willingness to help! |
Nice, let me know when you've got something I can look at! |
Fortunately, I cannot reproduce the issue with my stripped-down seed (with more up to date dependencies). Horray! Like the clicker repository I can test components annotated with "@page". In case you are interested, here is my seed with the testing example: There is still some work needed to make the test compilation fast. On a plus side, I'm not wrapping my tests with a main class, I can get away with fewer dependencies, and I do not depend on module loader workaround. Also, I prefer to not transpile configuration (gulpfile, etc). clicker was definitely an inspiration! Keep it up! |
I am interested, you seem to have been able to remove quite a lot of the boilerplate. I am really keen to remove the dependency on system. I'll definitely be using this to see if I can apply the same stuff here. Thanks. |
@bengro do you know if there is any way to get a usable coverage report when bundling the specs? |
No, I have not experimented with coverage support. But please let me know if you have something working nicely :)
|
Will do, thanks for the prompt reply
|
I've used remap-istanbul which works really well. https://github.com/lathonez/clicker/blob/lightweightify/test/gulpfile.ts#L138-L184 Couple things:
https://codecov.io/github/lathonez/clicker?branch=lightweightify I'm pretty happy with the setup on this branch, which is heavily based on your work here, so many thanks. In the coming days I'll be cleaning up, merging back and re-doing the blog. Will be sure to give you props. |
No worries at all, I'm glad you like it - I'm going to look into making the karma tests smoother. At the moment, transpiling and bundling up all files is taking ages and ruins the nice feedback one should get from unit tests. Can let you know if I find a nice setup. Thanks for the pointers to istanbul. |
For me it's producing the sourcemap that's taking most of the time. I was going to look into partially caching it (I think that's a thing), but yeah not until I've got this stuff merged back. Happy with the set up now, it's just the build time which is frustrating. Please do give me a shout if you find something. |
As mentioned here karma craps out when testing implementation that contains @page annotation.
I am not using the clicker setup but my own setup which is heavily inspired by clicker. I would be interested in what I'm missing in my setup. I apologise in advance for abusing an issue - it is not an issue of your code.
The error I get on the client is:
Karma server craps out with:
package.json
karma.config.js
karma-ionic.js (loaded by karma.config.js)
The text was updated successfully, but these errors were encountered: