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 link
did not seem to work, due tonpm
itself being local as per thenpm link npm
command in.travis.yml
.Removing
npm link npm
caused the tests to file in a spectacular fashion.npm4
builds fail becauseng install
tests report a missing package -npm
itself. This seems to have been what originated the inclusion ofnpm link npm
in.travis.yml
. Also related, #185 (comment).npm5
builds fail in a much more confusing way.Linking
angular-cli
shows a couple of warnings about npm packages that aren't part ofangular-cli
nor are present in npm4 builds:There is also a weird stray error during the
ng new
test, that seems to be responsible for forng new
failing: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 install
andng uninstall
and the resulting build seems to pass every test, correctly linking the existingangular-cli
and succeding and bulding the generated project, typings included.This seems to indicate that either the
ng install
andng uninstall
acceptance tests or the commands themselves break subsequent tests.I found two references to the instability of using the
npm
module programatically: one on stack overflow and one on ember-cli.This prompted me to change the
ng install
andng uninstall
code to useshelljs
to runnpm install/uninstall
commands 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