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

helper-test --test-type unit generates broken code in Ember 3.11 #18245

Closed
Windvis opened this issue Aug 9, 2019 · 2 comments · Fixed by #19808
Closed

helper-test --test-type unit generates broken code in Ember 3.11 #18245

Windvis opened this issue Aug 9, 2019 · 2 comments · Fixed by #19808
Assignees
Labels

Comments

@Windvis
Copy link
Contributor

Windvis commented Aug 9, 2019

It looks like #15609 was merged without also adjusting the helper-test blueprint. Since the helper module no longer exports a named function the generated code is invalid by default.

I'm not sure how this should be solved. Unit tests can still be useful for helpers that return values which are not intended for rendering.

@locks locks self-assigned this Apr 19, 2020
@locks locks added the Bug label Apr 19, 2020
@locks
Copy link
Contributor

locks commented Apr 19, 2020

I stumbled onto this myself. If you have a function that you want to call outside of the rendering context, my suggestion is to make a util that you can unit test, and that the helper can then import and use and you would still use a rendering test for the helper.

@rwjblue
Copy link
Member

rwjblue commented May 23, 2020

I'm not sure how this should be solved. Unit tests can still be useful for helpers that return values which are not intended for rendering.

We should remove the --test-type option for the helper blueprint and associated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants