Skip to content

Commit a2383cf

Browse files
authored
build: enable AoT compilation for all tests (#31930)
Enables AoT compilation for all of our unit tests and fixes most of the errors that had accumulated over time.
1 parent ef70029 commit a2383cf

File tree

228 files changed

+590
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+590
-625
lines changed

src/cdk-experimental/accordion/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -18,7 +18,7 @@ ng_project(
1818
],
1919
)
2020

21-
ts_project(
21+
ng_project(
2222
name = "unit_test_sources",
2323
testonly = True,
2424
srcs = [

src/cdk-experimental/combobox/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -19,7 +19,7 @@ ng_project(
1919
],
2020
)
2121

22-
ts_project(
22+
ng_project(
2323
name = "unit_test_sources",
2424
testonly = True,
2525
srcs = glob(

src/cdk-experimental/deferred-content/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -14,7 +14,7 @@ ng_project(
1414
],
1515
)
1616

17-
ts_project(
17+
ng_project(
1818
name = "unit_test_sources",
1919
testonly = True,
2020
srcs = [

src/cdk-experimental/listbox/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -16,7 +16,7 @@ ng_project(
1616
],
1717
)
1818

19-
ts_project(
19+
ng_project(
2020
name = "unit_test_sources",
2121
testonly = True,
2222
srcs = glob(

src/cdk-experimental/popover-edit/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -22,7 +22,7 @@ ng_project(
2222
],
2323
)
2424

25-
ts_project(
25+
ng_project(
2626
name = "unit_test_sources",
2727
testonly = True,
2828
srcs = glob(

src/cdk-experimental/popover-edit/popover-edit.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,9 @@ class ElementDataSource extends DataSource<PeriodicElement> {
979979
</div>
980980
</ng-template>
981981
982-
<span *cdkIfRowHovered>
982+
<ng-template>
983983
<button cdkEditOpen>Edit</button>
984-
</span>
984+
</ng-template>
985985
</cdk-cell>
986986
</ng-container>
987987
@@ -1053,9 +1053,9 @@ class CdkFlexTableInCell extends BaseTestComponent {
10531053
</div>
10541054
</ng-template>
10551055
1056-
<span *cdkIfRowHovered>
1056+
<ng-template>
10571057
<button cdkEditOpen>Edit</button>
1058-
</span>
1058+
</ng-template>
10591059
</td>
10601060
</ng-container>
10611061
@@ -1128,9 +1128,9 @@ class CdkTableInCell extends BaseTestComponent {
11281128
</div>
11291129
</ng-template>
11301130
1131-
<span *cdkIfRowHovered>
1131+
<ng-template>
11321132
<button cdkEditOpen>Edit</button>
1133-
</span>
1133+
</ng-template>
11341134
</td>
11351135
</ng-container>
11361136

src/cdk-experimental/radio-group/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -17,7 +17,7 @@ ng_project(
1717
],
1818
)
1919

20-
ts_project(
20+
ng_project(
2121
name = "unit_test_sources",
2222
testonly = True,
2323
srcs = glob(

src/cdk-experimental/scrolling/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ng_project(
1919
],
2020
)
2121

22-
ts_project(
22+
ng_project(
2323
name = "unit_test_sources",
2424
testonly = True,
2525
srcs = glob(

src/cdk-experimental/scrolling/virtual-scroll-viewport.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {CdkVirtualScrollViewport, ScrollingModule} from '@angular/cdk/scrolling';
2-
import {Component, Input, ViewChild, ViewEncapsulation} from '@angular/core';
2+
import {Component, ViewChild, ViewEncapsulation} from '@angular/core';
33
import {ComponentFixture, TestBed, fakeAsync, flush} from '@angular/core/testing';
44
import {ScrollingModule as ExperimentalScrollingModule} from './scrolling-module';
55

@@ -94,12 +94,12 @@ function finishInit(fixture: ComponentFixture<any>) {
9494
class AutoSizeVirtualScroll {
9595
@ViewChild(CdkVirtualScrollViewport, {static: true}) viewport: CdkVirtualScrollViewport;
9696

97-
@Input() orientation = 'vertical';
98-
@Input() viewportSize = 200;
99-
@Input() viewportCrossSize = 100;
100-
@Input() minBufferPx = 0;
101-
@Input() maxBufferPx = 0;
102-
@Input() items = Array(10).fill(50);
97+
orientation: 'vertical' | 'horizontal' = 'vertical';
98+
viewportSize = 200;
99+
viewportCrossSize = 100;
100+
minBufferPx = 0;
101+
maxBufferPx = 0;
102+
items = Array(10).fill(50);
103103

104104
get viewportWidth() {
105105
return this.orientation == 'horizontal' ? this.viewportSize : this.viewportCrossSize;

src/cdk-experimental/selection/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite", "ts_project")
1+
load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -20,7 +20,7 @@ ng_project(
2020
],
2121
)
2222

23-
ts_project(
23+
ng_project(
2424
name = "unit_test_sources",
2525
testonly = True,
2626
srcs = glob(

0 commit comments

Comments
 (0)