-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Proposal: switching to template-driven component integration tests #25
Comments
I think that a template-driven integration test that's not exclusive to a particular component has its place. This provides a way to test integration of multiple components and/or views outside of the context of an application. |
I suppose I'm proposing that This sandbox could be an an integration test by default, but have the option of having an isolated container as well. In this way, the unit vs. integration split remains defined simply by its isolation. |
That sounds good. I still think we need a better name -- Maybe we can solve that by dropping the What about |
|
I'm thinking ahead to what we name it in those too. That's what motivated this issue, because I was about to submit PRs to those projects to expose this new thing. |
Indeed - that's the more important naming question. Hmmmm.... |
After much thought and discussion, I propose this solution:
|
This is fortuitous! I have been struggling a lot with trying to setup component tests that are sensible. When services, models and other things that ultimately a component depends upon to work, it is a real bear to setup. How about something like
The idea here is that your "sandbox" represents a very custom micro app that has everything stubbed and ready for use for testing a component.
It would be nice to be able to set these up as part of test configuration or else inline in a specific component test. |
Closing as @ef4's last proposal has landed and is released. |
Now that we have
{integration: true }
capability inTestModule
, what do people think about merging the functionality from my newTestModuleForIntegration
directly intoTestModuleForComponent
whenintegration: true
?This would let us get rid of the separate
TestModuleForIntegration
name entirely, which I agree is not a great name.To keep the API understandable, I would suggest that component unit tests keep their existing API but component integration tests would be expected to move to the new template-driven API, with deprecation warnings on the old way.
The text was updated successfully, but these errors were encountered: