Skip to content

Commit 8858465

Browse files
clydinalan-agius4
authored andcommitted
test(@angular/cli): account for windows line endings in generate exports E2E tests
(cherry picked from commit 2a6bda2)
1 parent e7e543e commit 8858465

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/legacy-cli/e2e/tests/generate/component/component-module-export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function() {
77
const modulePath = join('src', 'app', 'app.module.ts');
88

99
return ng('generate', 'component', 'test-component', '--export')
10-
.then(() => expectFileToMatch(modulePath, /exports: \[\n(\s*) TestComponentComponent\n\1\]/))
10+
.then(() => expectFileToMatch(modulePath, /exports: \[\r?\n(\s*) TestComponentComponent\r?\n\1\]/))
1111

1212
// Try to run the unit tests.
1313
.then(() => ng('test', '--watch=false'));

tests/legacy-cli/e2e/tests/generate/directive/directive-module-export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function() {
77
const modulePath = join('src', 'app', 'app.module.ts');
88

99
return ng('generate', 'directive', 'test-directive', '--export')
10-
.then(() => expectFileToMatch(modulePath, /exports: \[\n(\s*) TestDirectiveDirective\n\1\]/))
10+
.then(() => expectFileToMatch(modulePath, /exports: \[\r?\n(\s*) TestDirectiveDirective\r?\n\1\]/))
1111

1212
// Try to run the unit tests.
1313
.then(() => ng('test', '--watch=false'));

tests/legacy-cli/e2e/tests/generate/pipe/pipe-module-export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function() {
77
const modulePath = join('src', 'app', 'app.module.ts');
88

99
return ng('generate', 'pipe', 'test-pipe', '--export')
10-
.then(() => expectFileToMatch(modulePath, /exports: \[\n(\s*) TestPipePipe\n\1\]/))
10+
.then(() => expectFileToMatch(modulePath, /exports: \[\r?\n(\s*) TestPipePipe\r?\n\1\]/))
1111

1212
// Try to run the unit tests.
1313
.then(() => ng('test', '--watch=false'));

0 commit comments

Comments
 (0)