Reputation: 4784
I have several ember apps which use a common shared ember-cli addon. This addon has common code like models, navigation etc. I also want this addon to provide common test support code like test helpers, factories to the ember apps. However if I remove tests
from .npmignore
in the addon, then the test resources gets built with the ember app.
Is there a way to use the addon in an ember app, but strip the addon's tests
folder on build? Or perhaps there is a better way of achieving this?
Upvotes: 1
Views: 204
Reputation: 4784
Common code can go to the addon's test-support
folder. That folder would automatically get merged into the app's tests
folder.
This is mentioned here - https://ember-cli.com/extending/#addon-project-structure
Upvotes: 0