Skip to content

Commit 9943385

Browse files
committed
test: reduce harness-e2e-cli test time
This change optimizes the `harness-e2e-cli` integration test by migrating to the `@angular/build` application builder (esbuild), which significantly improves build performance. Additionally, unused configurations such as Karma unit tests, SCSS support, and i18n extraction have been removed to further streamline the project and reduce dependencies. `wait-on` has also been updated to improve handling of server readiness. These improvements reduce the execution time of `//integration/harness-e2e-cli:test` to approximately 20 seconds.
1 parent 2ad3866 commit 9943385

File tree

9 files changed

+2575
-5973
lines changed

9 files changed

+2575
-5973
lines changed

integration/harness-e2e-cli/angular.json

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"newProjectRoot": "projects",
5+
"cli": {
6+
"cache": {
7+
"enabled": false
8+
}
9+
},
510
"projects": {
611
"harness-e2e-cli": {
712
"projectType": "application",
@@ -18,16 +23,16 @@
1823
"prefix": "app",
1924
"architect": {
2025
"build": {
21-
"builder": "@angular-devkit/build-angular:browser",
26+
"builder": "@angular/build:application",
2227
"options": {
2328
"outputPath": "dist/harness-e2e-cli",
29+
"polyfills": ["zone.js"],
2430
"index": "src/index.html",
25-
"main": "src/main.ts",
26-
"polyfills": "src/polyfills.ts",
31+
"browser": "src/main.ts",
2732
"tsConfig": "tsconfig.app.json",
28-
"inlineStyleLanguage": "scss",
33+
"inlineStyleLanguage": "css",
2934
"assets": ["src/favicon.ico", "src/assets"],
30-
"styles": ["src/styles.scss"],
35+
"styles": ["src/styles.css"],
3136
"scripts": []
3237
},
3338
"configurations": {
@@ -53,9 +58,7 @@
5358
"outputHashing": "all"
5459
},
5560
"development": {
56-
"buildOptimizer": false,
5761
"optimization": false,
58-
"vendorChunk": true,
5962
"extractLicenses": false,
6063
"sourceMap": true,
6164
"namedChunks": true
@@ -64,7 +67,7 @@
6467
"defaultConfiguration": "production"
6568
},
6669
"serve": {
67-
"builder": "@angular-devkit/build-angular:dev-server",
70+
"builder": "@angular/build:dev-server",
6871
"configurations": {
6972
"production": {
7073
"buildTarget": "harness-e2e-cli:build:production"
@@ -74,25 +77,6 @@
7477
}
7578
},
7679
"defaultConfiguration": "development"
77-
},
78-
"extract-i18n": {
79-
"builder": "@angular-devkit/build-angular:extract-i18n",
80-
"options": {
81-
"buildTarget": "harness-e2e-cli:build"
82-
}
83-
},
84-
"test": {
85-
"builder": "@angular-devkit/build-angular:karma",
86-
"options": {
87-
"main": "src/test.ts",
88-
"polyfills": "src/polyfills.ts",
89-
"tsConfig": "tsconfig.spec.json",
90-
"karmaConfig": "karma.conf.js",
91-
"inlineStyleLanguage": "scss",
92-
"assets": ["src/favicon.ico", "src/assets"],
93-
"styles": ["src/styles.scss"],
94-
"scripts": []
95-
}
9680
}
9781
}
9882
}

integration/harness-e2e-cli/karma.conf.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

integration/harness-e2e-cli/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"zone.js": "~0.15.0"
2727
},
2828
"devDependencies": {
29-
"@angular-devkit/build-angular": "20.2.0",
29+
"@angular/build": "20.2.0",
3030
"@angular/cli": "20.2.0",
3131
"@angular/compiler-cli": "20.2.0",
3232
"@types/jasmine": "5.1.8",
@@ -35,14 +35,9 @@
3535
"concurrently": "^9.0.0",
3636
"jasmine": "5.8.0",
3737
"jasmine-core": "5.8.0",
38-
"karma": "6.4.4",
39-
"karma-chrome-launcher": "~3.2.0",
40-
"karma-coverage": "~2.2.0",
41-
"karma-jasmine": "~4.0.0",
42-
"karma-jasmine-html-reporter": "~2.1.0",
4338
"selenium-webdriver": "3.6.0",
4439
"ts-node": "~10.9.1",
4540
"typescript": "5.8.3",
46-
"wait-on": "^8.0.0"
41+
"wait-on": "^9.0.3"
4742
}
4843
}

0 commit comments

Comments
 (0)