Skip to content
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

Access to the component instance in moduleForComponent should be possible #184

Closed
Gaurav0 opened this issue Aug 25, 2015 · 2 comments
Closed

Comments

@Gaurav0
Copy link

Gaurav0 commented Aug 25, 2015

For some reason, in the component integration test, this.subject() returns an error and there is no other way provided to allow anyone to access the component instance.

This does not allow for many types of tests, like checking the value of a computed property after clicking on a button.

@mitchlloyd
Copy link

Component Unit tests are still possible if you want to check properties on your components. However, I bet you'll still end up with a better test if you use the integration style.

If the value of that component is completely internal then it should not be tested. If the value of that component has some side effect, then that side effect should be tested. In this case, I bet there is some side effect when you click that button and the CP is just an internal detail.

@Turbo87
Copy link
Member

Turbo87 commented Oct 14, 2017

yep, I tend to agree with @mitchlloyd

closing this issue as things are working as intended

@Turbo87 Turbo87 closed this as completed Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants