Skip to content

Commit 84e67ce

Browse files
authored
ci: when testing with ng4 add ng4 to all ng new calls (#4974)
There was a missing one for routing.
1 parent a537dce commit 84e67ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/e2e/utils/project.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ export function ngServe(...args: string[]) {
3232

3333

3434
export function createProject(name: string, ...args: string[]) {
35+
const argv: any = getGlobalVariable('argv');
36+
3537
return Promise.resolve()
3638
.then(() => process.chdir(getGlobalVariable('tmp-root')))
37-
.then(() => ng('new', name, '--skip-install', ...args))
39+
.then(() => ng('new', name, '--skip-install', ...(argv['ng4'] ? ['--ng4'] : []), ...args))
3840
.then(() => process.chdir(name))
3941
.then(() => updateJsonFile('package.json', json => {
4042
Object.keys(packages).forEach(pkgName => {
4143
json['dependencies'][pkgName] = packages[pkgName].dist;
4244
});
4345
}))
4446
.then(() => {
45-
const argv: any = getGlobalVariable('argv');
4647
if (argv.nightly || argv['ng-sha']) {
4748
const label = argv['ng-sha'] ? `#2.0.0-${argv['ng-sha']}` : '';
4849
return updateJsonFile('package.json', json => {

0 commit comments

Comments
 (0)