Skip to content

Commit

Permalink
fix(angular): fix failing e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Nov 9, 2022
1 parent efc1005 commit 92557ce
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions e2e/make-angular-cli-faster/src/make-angular-cli-faster.test.ts
@@ -1,12 +1,13 @@
import {
cleanupProject,
getSelectedPackageManager,
runNgNew,
tmpProjPath,
uniq,
} from '../../utils';
import { PackageManager } from 'nx/src/utils/package-manager';
import { execSync } from 'child_process';
import { removeSync } from 'fs-extra';
import * as isCI from 'is-ci';

describe('make-angular-cli-faster', () => {
let project: string;
Expand All @@ -20,7 +21,21 @@ describe('make-angular-cli-faster', () => {
});

afterEach(() => {
cleanupProject();
/* TODO(Colum): Turn this on when it's investigated more.
* The `yarn nx reset` command that gets run as part of `cleanupProject` is
* causing an issue in the workspace that this test creates.
*
* I cannot reproduce this locally when I follow the steps in this test,
* including setup and teardown.
*
* For now, inlining the removal of the project, skipping the `yarn nx reset`
*/
// cleanupProject();
if (isCI) {
try {
removeSync(tmpProjPath());
} catch (e) {}
}
});

it('should successfully install make-angular-cli-faster with nx cloud', () => {
Expand All @@ -29,12 +44,12 @@ describe('make-angular-cli-faster', () => {

expect(() =>
execSync(
`NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx --yes make-angular-cli-faster@latest --useNxCloud=true`,
`NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx --yes make-angular-cli-faster --useNxCloud=true`,
{
cwd: tmpProjPath(),
env: process.env,
encoding: 'utf-8',
stdio: ['pipe', 'pipe', 'pipe'],
stdio: [1, 1, 1],
}
)
).not.toThrow();
Expand Down

0 comments on commit 92557ce

Please sign in to comment.