Skip to content

Commit 1f6a551

Browse files
alan-agius4clydin
authored andcommitted
test(@angular-devkit/build-angular): modify RegExp to handle output of mini-css-extract-plugin v2.1+
1 parent 2bd859e commit 1f6a551

File tree

1 file changed

+4
-4
lines changed
  • packages/angular_devkit/build_angular/src/browser/tests/options

1 file changed

+4
-4
lines changed

packages/angular_devkit/build_angular/src/browser/tests/options/styles_spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
107107
harness
108108
.expectFile('dist/styles.css')
109109
.content.toMatch(
110-
/\.test-c {color: blue}\s+\.test-d {color: yellow}\s+\.test-b {color: green}\s+\.test-a {color: red}/,
110+
/\.test-c {color: blue}[\s|\S]+\.test-d {color: yellow}[\s|\S]+\.test-b {color: green}[\s|\S]+\.test-a {color: red}/m,
111111
);
112112
});
113113

@@ -300,7 +300,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
300300
harness
301301
.expectFile('dist/styles.css')
302302
.content.toMatch(
303-
/\.test-c {color: blue}\s+\.test-d {color: yellow}\s+\.test-b {color: green}\s+\.test-a {color: red}/,
303+
/\.test-c {color: blue}[\s|\S]+\.test-d {color: yellow}[\s|\S]+\.test-b {color: green}[\s|\S]+\.test-a {color: red}/,
304304
);
305305
});
306306

@@ -328,10 +328,10 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
328328

329329
harness
330330
.expectFile('dist/other.css')
331-
.content.toMatch(/\.test-c {color: blue}\s+\.test-a {color: red}/);
331+
.content.toMatch(/\.test-c {color: blue}[\s|\S]+\.test-a {color: red}/);
332332
harness
333333
.expectFile('dist/extra.css')
334-
.content.toMatch(/\.test-d {color: yellow}\s+\.test-b {color: green}/);
334+
.content.toMatch(/\.test-d {color: yellow}[\s|\S]+\.test-b {color: green}/);
335335
harness
336336
.expectFile('dist/index.html')
337337
.content.toMatch(

0 commit comments

Comments
 (0)