fix(tests): link package in e2e tests #198
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #194
This issue proved to be harder to fix than it initially looked like.
Running
npm linkdid not seem to work, due tonpmitself being local as per thenpm link npmcommand in.travis.yml.Removing
npm link npmcaused the tests to file in a spectacular fashion.npm4builds fail becauseng installtests report a missing package -npmitself. This seems to have been what originated the inclusion ofnpm link npmin.travis.yml. Also related, #185 (comment).npm5builds fail in a much more confusing way.Linking
angular-clishows a couple of warnings about npm packages that aren't part ofangular-clinor are present in npm4 builds:There is also a weird stray error during the
ng newtest, that seems to be responsible for forng newfailing:The e2e build tests fail with missing core packages that should have been installed in in the initial
ng new test-project(that seems to fail):I tried removing the acceptance tests for
ng installandng uninstalland the resulting build seems to pass every test, correctly linking the existingangular-cliand succeding and bulding the generated project, typings included.This seems to indicate that either the
ng installandng uninstallacceptance tests or the commands themselves break subsequent tests.I found two references to the instability of using the
npmmodule programatically: one on stack overflow and one on ember-cli.This prompted me to change the
ng installandng uninstallcode to useshelljsto runnpm install/uninstallcommands instead using npm programatically as before. That seems to have fixed the weird interactions between their acceptance tests and the e2e tests./cc @hansl @jkuri @Brocco