Skip to content

Commit 66dadce

Browse files
filipesilvaBrocco
authored andcommitted
test: globally install tar instead of linking
1 parent 18fb4c5 commit 66dadce

File tree

3 files changed

+22
-44
lines changed

3 files changed

+22
-44
lines changed

tests/e2e/setup/100-global-cli.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {silentNpm, exec} from '../utils/process';
2+
import {getGlobalVariable} from '../utils/env';
3+
4+
const packages = require('../../../lib/packages').packages;
5+
6+
7+
export default function () {
8+
return Promise.resolve()
9+
.then(() => {
10+
const argv = getGlobalVariable('argv');
11+
if (argv.noglobal) {
12+
return;
13+
}
14+
15+
// Install global Angular CLI.
16+
return silentNpm('install', '-g', packages['@angular/cli'].tar);
17+
})
18+
.then(() => exec(process.platform.startsWith('win') ? 'where' : 'which', 'ng'));
19+
}

tests/e2e/setup/100-npm-link.ts

Lines changed: 0 additions & 41 deletions
This file was deleted.

tests/e2e_runner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Error.stackTraceLimit = Infinity;
2525
* Here's a short description of those flags:
2626
* --debug If a test fails, block the thread so the temporary directory isn't deleted.
2727
* --noproject Skip creating a project or using one.
28-
* --nobuild Skip building the packages. Use with --nolink and --reuse to quickly
28+
* --nobuild Skip building the packages. Use with --noglobal and --reuse to quickly
2929
* rerun tests.
30-
* --nolink Skip linking your local @angular/cli directory. Can save a few seconds.
30+
* --noglobal Skip linking your local @angular/cli directory. Can save a few seconds.
3131
* --nosilent Never silence ng commands.
3232
* --ng-sha=SHA Use a specific ng-sha. Similar to nightly but point to a master SHA instead
3333
* of using the latest.
@@ -49,7 +49,7 @@ const argv = minimist(process.argv.slice(2), {
4949
'debug',
5050
'eject',
5151
'nightly',
52-
'nolink',
52+
'noglobal',
5353
'nosilent',
5454
'noproject',
5555
'verbose',

0 commit comments

Comments
 (0)