fix(tests): link package in e2e tests#198
Merged
filipesilva merged 1 commit intoangular:masterfrom Feb 13, 2016
Merged
Conversation
7eabffb to
d878407
Compare
164f058 to
227ab3c
Compare
Contributor
|
lgtm |
addon/ng2/tasks/lib-install.js
Outdated
| } | ||
| var npmCommand = 'npm install ' + this.packages.join(' ') + this.npmOptions; | ||
|
|
||
| return new Promise(function (resolve, reject){ |
Contributor
There was a problem hiding this comment.
This is a pattern that we will do a lot and I'd like to avoid the copy and paste. Could you move the sh.exec and promise into a helper function that would be imported everywhere?
227ab3c to
4b04e81
Compare
4b04e81 to
94c9746
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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