Skip to content

Commit

Permalink
cleanup(angular): fix e2e tests (#19789)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Oct 23, 2023
1 parent abf1f9d commit 945713e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions e2e/angular-core/src/ng-add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ describe('convert Angular CLI workspace to an Nx workspace', () => {
expect(projectConfig.targets.serve).toEqual({
executor: '@angular-devkit/build-angular:dev-server',
configurations: {
production: { browserTarget: `${project}:build:production` },
development: { browserTarget: `${project}:build:development` },
production: { buildTarget: `${project}:build:production` },
development: { buildTarget: `${project}:build:development` },
},
defaultConfiguration: 'development',
});
Expand Down Expand Up @@ -257,7 +257,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => {
});

runCLI(`build ${project} --configuration production --outputHashing none`);
checkFilesExist(`dist/apps/${project}/main.js`);
checkFilesExist(`dist/apps/${project}/browser/main.js`);
});

it('should handle a workspace with cypress v9', () => {
Expand Down Expand Up @@ -450,7 +450,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => {
expect(output).toContain(
`Successfully ran target build for project ${project}`
);
checkFilesExist(`dist/apps/${project}/main.js`);
checkFilesExist(`dist/apps/${project}/browser/main.js`);

output = runCLI(`build ${project} --outputHashing none`);
expect(output).toContain(
Expand All @@ -468,7 +468,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => {
expect(output).toContain(
`Successfully ran target build for project ${app1}`
);
checkFilesExist(`dist/apps/${app1}/main.js`);
checkFilesExist(`dist/apps/${app1}/browser/main.js`);

output = runCLI(`build ${app1} --outputHashing none`);
expect(output).toContain(
Expand Down
4 changes: 2 additions & 2 deletions e2e/nx-init/src/nx-init-angular.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('nx init (Angular CLI)', () => {
expect(coldBuildOutput).toContain(
`Successfully ran target build for project ${project}`
);
checkFilesExist(`dist/${project}/main.js`);
checkFilesExist(`dist/${project}/browser/main.js`);

// run build again to check is coming from cache
const cachedBuildOutput = runCLI(`build ${project} --outputHashing none`);
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('nx init (Angular CLI)', () => {
expect(coldBuildOutput).toContain(
`Successfully ran target build for project ${project}`
);
checkFilesExist(`dist/apps/${project}/main.js`);
checkFilesExist(`dist/apps/${project}/browser/main.js`);

// run build again to check is coming from cache
const cachedBuildOutput = runCLI(`build ${project} --outputHashing none`);
Expand Down

0 comments on commit 945713e

Please sign in to comment.