Skip to content

Commit 8e55424

Browse files
committed
test: update autoprefixer behavior tests to not use metadata emit
(cherry picked from commit de5c731)
1 parent 71e571b commit 8e55424

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

packages/angular_devkit/build_angular/src/builders/browser-esbuild/tests/behavior/stylesheet_autoprefixer_spec.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
106106

107107
harness
108108
.expectFile('dist/main.js')
109-
.content.toMatch(
110-
/section\s*{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/,
111-
);
109+
.content.toMatch(/{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/);
112110
harness
113111
.expectFile('dist/main.js')
114-
.content.toMatch(/div\s*{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/);
112+
.content.toMatch(/{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/);
115113
});
116114

117115
it(`should not add prefixes if not required by browsers in external component styles [${ext}]`, async () => {
@@ -137,10 +135,8 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
137135
const { result } = await harness.executeOnce();
138136
expect(result?.success).toBeTrue();
139137

140-
harness
141-
.expectFile('dist/main.js')
142-
.content.toMatch(/section\s*{\\n\s*hyphens:\s*none;\\n\s*}/);
143-
harness.expectFile('dist/main.js').content.toMatch(/div\s*{\\n\s*hyphens:\s*none;\\n\s*}/);
138+
harness.expectFile('dist/main.js').content.toMatch(/{\\n\s*hyphens:\s*none;\\n\s*}/);
139+
harness.expectFile('dist/main.js').content.toMatch(/{\\n\s*hyphens:\s*none;\\n\s*}/);
144140
});
145141
}
146142

@@ -169,7 +165,8 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
169165

170166
harness
171167
.expectFile('dist/main.js')
172-
.content.toMatch(/div\s*{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/);
168+
// div[_ngcontent-%COMP%] {\n -webkit-hyphens: none;\n hyphens: none;\n}\n
169+
.content.toMatch(/{\\n\s*-webkit-hyphens:\s*none;\\n\s*hyphens:\s*none;\\n\s*}/);
173170
});
174171

175172
it('should not add prefixes if not required by browsers in inline component styles', async () => {
@@ -193,7 +190,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
193190
const { result } = await harness.executeOnce();
194191
expect(result?.success).toBeTrue();
195192

196-
harness.expectFile('dist/main.js').content.toMatch(/div\s*{\\n\s*hyphens:\s*none;\\n\s*}/);
193+
harness.expectFile('dist/main.js').content.toMatch(/{\\n\s*hyphens:\s*none;\\n\s*}/);
197194
});
198195
});
199196
});

0 commit comments

Comments
 (0)