Skip to content

Commit 4048e3c

Browse files
clydinfilipesilva
authored andcommitted
test(@angular-devkit/build-angular): improve performance of autoprefixer tests
These tests check the output of the global stylesheet and require a browserslist to target IE but this also triggers differential loading which is unneeded for the test.
1 parent e8fa77e commit 4048e3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/angular_devkit/build_angular/src/browser/specs/styles_spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ describe('Browser Builder styles', () => {
305305
'.browserslistrc': 'IE 10',
306306
});
307307

308+
// Set to target to ES5 to avoid differential loading and unnecessary testing time
309+
host.replaceInFile('tsconfig.json', '"target": "es2015"', '"target": "es5"');
310+
308311
const overrides = { extractCss: true, optimization: false };
309312
const { files } = await browserBuild(architect, host, target, overrides);
310313
expect(await files['styles.css']).toContain(tags.stripIndents`
@@ -342,6 +345,9 @@ describe('Browser Builder styles', () => {
342345
'.browserslistrc': 'IE 10',
343346
});
344347

348+
// Set target to ES5 to avoid differential loading and unnecessary testing time
349+
host.replaceInFile('tsconfig.json', '"target": "es2015"', '"target": "es5"');
350+
345351
const overrides = { extractCss: true, optimization: true, styles: ['src/styles.scss'] };
346352
const { files } = await browserBuild(architect, host, target, overrides);
347353
expect(await files['styles.css']).toContain('-ms-grid-columns:100px;');

0 commit comments

Comments
 (0)