-
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
Forms Unit Testing #146
Comments
Hey, Thanks for the kind words. Yeah, this was an absolute pain, it all started when we took the RC4 forms. For full background see #126 The summarising comment is here: #126 (comment) TL;dr - when we bootstrap the app we set up forms: ionicBootstrap(ClickerApp, [
disableDeprecatedForms(),
provideForms(), This also appears to set up what we need for directives too. I don't know how this happens, it's just what I've observed from digging. I'd love to find some further reading on it but I've not had any luck so far. When we're unit testing there's no bootstrapping, everything is tested in isolation, so we have to put some extra mileage in to get the forms to work. I've not found that I need to pass Sorry this isn't more helpful. |
Yeah, A bit reluctant to add extra code just to make tests work, but I guess we have to for now. |
I guess the alternative is calling ionicBootatrap for every relevant unit On 12 Sep 2016 15:22, "Alvin Leonard" [email protected] wrote:
|
Yeah that would be the alternative. :) |
Thanks for the feedback @lathonez. Closing this thread now. :) |
Hi @lathonez, first of all I want to say awesome stuff on the Unit Testing Ionic 2 blog: http://lathonez.github.io/2016/ionic-2-unit-testing/.
I had a look at your Clicker demo, in particular the Forms component and how it can be unit/integration tested. There is one particular line there which intrigues me:
I'd like to ask if there's more details about the
directives
that is passed through to the Component. This line resolves my error below but I'd like to know how as I could not find any documentation on Angular 2 side.The text was updated successfully, but these errors were encountered: