Skip to content

Commit 64d25a5

Browse files
clydinvikerman
authored andcommitted
test: ensure E2E locally published packages are used
Fixes issues when `ng-snapshots` option is used. Otherwise an older version of the CLI packages could potentially be used.
1 parent 6649483 commit 64d25a5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/legacy-cli/e2e/utils/project.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import * as fs from 'fs-extra';
2-
import { readFile, writeFile, replaceInFile, prependToFile } from './fs';
3-
import { execAndWaitForOutputToMatch, npm, silentNpm, ng, git } from './process';
4-
import { getGlobalVariable } from './env';
5-
import { gitCommit } from './git';
1+
import * as fs from 'fs';
62
import { prerelease } from 'semver';
73
import { packages } from '../../../../lib/packages';
8-
4+
import { getGlobalVariable } from './env';
5+
import { prependToFile, readFile, replaceInFile, writeFile } from './fs';
6+
import { gitCommit } from './git';
7+
import { execAndWaitForOutputToMatch, git, ng, npm, silentNpm } from './process';
98

109
const tsConfigPath = 'tsconfig.json';
1110

@@ -80,10 +79,10 @@ export async function prepareProjectForE2e(name) {
8079

8180
if (argv['ng-snapshots'] || argv['ng-tag']) {
8281
await useSha();
83-
} else {
84-
await writeFile('.npmrc', 'registry=http://localhost:4873');
8582
}
8683

84+
await writeFile('.npmrc', 'registry=http://localhost:4873');
85+
8786
console.log(
8887
`Project ${name} created... Installing npm.`,
8988
);

0 commit comments

Comments
 (0)