Skip to content

Commit bdcdc0a

Browse files
committed
fix(tests): link package in e2e tests
Close angular#194
1 parent ecd2cf1 commit bdcdc0a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ before_install:
1010
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash; fi
1111
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source ~/.nvm/nvm-exec; fi
1212
- nvm install $NODE_VERSION
13-
- npm link npm
1413
- npm config set spin false
1514
install:
1615
- node --version

tests/acceptance/init.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe('Acceptance: ng init', function() {
119119
})
120120
.then(confirmBlueprinted)
121121
.then(function() {
122+
process.chdir('../../');
122123
return tmp.teardown('./tmp/foo');
123124
});
124125
});

tests/e2e/e2e_workflow.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ describe('Basic end-to-end Workflow', function () {
1717

1818
it('Installs angular-cli correctly', function() {
1919
this.timeout(300000);
20-
20+
21+
sh.exec('npm link', { silent: true });
2122
return tmp.setup('./tmp')
2223
.then(function () {
2324
process.chdir('./tmp');
24-
25-
sh.exec('npm i angular-cli -g -C ' + process.cwd(), { silent: true });
2625
expect(fs.existsSync(path.join(process.cwd(), 'bin', 'ng')));
2726
});
2827
});
@@ -41,6 +40,7 @@ describe('Basic end-to-end Workflow', function () {
4140

4241
it('Can change current working directory to `test-project`', function() {
4342
process.chdir(path.join(root, 'test-project'));
43+
sh.exec('npm link angular-cli', { silent: true });
4444
expect(path.basename(process.cwd())).to.equal('test-project');
4545
});
4646

0 commit comments

Comments
 (0)