quaertym / ember-cli-dependency-checker

Ember CLI addon for checking missing node and bower dependencies before running ember commands
MIT License
40 stars 37 forks source link

Circumvent dependency checker when testing blueprints #49

Closed trabus closed 8 years ago

trabus commented 8 years ago

When testing blueprints, there is a need to circumvent the dependency checker since we're not actually installing npm and bower dependencies, we're just testing that the blueprint installs the correct files with the correct contents.

This PR adds a check for project.cli.testing which is set when the ember test helper is used here. We should not be running the dependency checker when testing, as we skip npm and bower installs while testing.

rwjblue commented 8 years ago

I am not opposed to adding this, but could the test helpers use the environment variable that is already there?

stefanpenner commented 8 years ago

I'm slightly concerned, disabling this may result in false positives in our test suite.That being said, I can be convince that it is a trade-off we should make.

trabus commented 8 years ago

@rwjblue @stefanpenner Basically what was happening is that the dependency checker was picking up on the consuming app's project file, and seeing that none of the dependencies were installed in the tmp folder. I'm all for putting a safer way in to disable this explicitly, and I will investigate adding an additional option to the ember test helper that would need to be passed when invoking the ember helper.

Maybe something like: return ember(['command', 'args'], {disableDependencyChecker: true});

trabus commented 8 years ago

Okay, made it explicit, and gets passed in here then set to the project here.

rwjblue commented 8 years ago

This looks good to me.

stefanpenner commented 8 years ago

@quaertym this should be good to release, unfortunately I do not have those rights, so you will have to do this for us.

quaertym commented 8 years ago

Released as v1.2.0

trabus commented 8 years ago

@quaertym thank you!