content: Ionic Angular Testing (Standalone etc) #3808
Labels
content
Issues related to the contents of the documentation website
package: angular
Issues related to the Ionic Angular documentation
URL
https://ionicframework.com/docs/angular/testing
Issue Description
We are in dire need of some documentation on how to test ionic in angular.
The current documentation explains the theory behind testing but does not go into ionic specifics. I'd argue that the theory behind what is a unit test has been covered elsewhere in more detail and so it's not important for the ionic docs to go over that.
What we could use is knowing how to correctly bootstrap ionic so that components are loaded correctly and can be tested. I know theres some nuances due to ionics web component architecture. Some of it is explained on stencil docs and elsewhere.
While I've been able to figure out some things through looking the ionic source code and also a bit of blind luck there are some things I haven't been able to determine yet. For example when testing a standalone project it's not clear how to bootstrap ionic in testbed or whether its required at all? Using
provideIonicAngular()
doesn't seem to render any components but importing IonicModule does (but only if calling forRoot).But there are issues with using
IonicModule.forRoot
as described here ionic-team/ionic-framework#23173 (comment) hence why standalone is a good idea but these components don't seem to render?Any advice is helpful on this to point us in the right direction 🙏
The text was updated successfully, but these errors were encountered: