Commit de2c011
Make specs + test-infra type-check under strict; retire dead test-runner types (#5446)
The app strict flip also made specs strict, but nothing in the gate
type-checks specs (vitest transpiles via esbuild; ng build excludes them),
and vestigial karma->vitest `types` entries (jasmine/jasminewd2/karma,
vitest/globals) caused a tsc config-error short-circuit that MASKED the
whole surface. Unmask it and make specs genuinely strict-clean.
Config / tooling:
- Drop dead jasmine/jasminewd2/karma from the base `types`; repair the
broken (unused) entity-catalog-test-helpers (this.vi -> vi, drop jasmine.Spy).
- Add `@test-framework/*` path mapping (core->cloud-foundry->store fallback)
and `@stratosui/core/*` / `@stratosui/store/*` deep-subpath mappings so
tsc/IDE resolve test imports the way the vitest aliases already do.
- tsconfig.app.json: exclude `*.spec.ts` + config files (matches ng build's
scope; app config should not type-check tests).
- tsconfig.spec.json: drop the non-resolving `vitest/globals` (globals:false
-> specs import explicitly); exclude config files + non-test demo packages
(example-extensions, desktop-extensions).
Specs (52 files): fix ~230 strict-null / implicit-any / missing-vitest-import
findings. Real guards and faithful mock types; `!` only for fixture values
the test itself seeds, each with a // strict: comment. Test intent and
assertions preserved.
Verified: tsc -p app = 0, tsc -p spec = 0, ng build clean, full vitest
2604 passed / 0 failed, eslint 0 errors.1 parent 5dcb837 commit de2c011
55 files changed
Lines changed: 466 additions & 209 deletions
File tree
- src
- frontend/packages
- cf-autoscaler/src/core/autoscaler-helpers
- cloud-foundry
- src
- features
- applications
- application-delete
- application/application-tabs-base
- deploy-application
- deploy-application-step2-1
- deploy-application-step2
- edit-application
- cf
- add-space/create-space-step
- users
- invite-users/invite-users-create
- manage-users
- services/detach-service-instance
- services
- endpoint-data
- user-permissions
- test-framework
- core
- src
- core
- entity-favorite-star
- permissions
- features
- endpoints/connect-endpoint-dialog/auth-forms/token-endpoint
- home/home
- favorites-meta-card
- home-page-endpoint-card
- test-framework
- kubernetes/src
- kubernetes
- kube-config-registration/kube-config-selection/kube-config-table-user-select
- kubernetes-resource/kubernetes-resource-list
- workloads
- releases-tab
- release/tabs/helm-release-history-tab
- upgrade-release
- services/domain-data
- store/src
- entity-catalog
- services
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
177 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
0 commit comments