Skip to content

Commit 746ebf0

Browse files
committed
fix some CI issues
1 parent 5a43dd4 commit 746ebf0

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

src/cdk/testing/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ ts_library(
1111
"**/*.spec.ts",
1212
],
1313
),
14+
module_name = "@angular/cdk/testing",
1415
deps = [
1516
"@npm//rxjs",
1617
],
17-
module_name = "@angular/cdk/testing",
1818
)
1919

2020
markdown_to_html(

src/cdk/testing/component-harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {parallel} from '@angular/cdk/testing/harness-environment';
9+
import {parallel} from '@angular/cdk/testing';
1010
import {TestElement} from './test-element';
1111

1212
/** An async function that returns a promise when called. */

src/cdk/testing/testbed/testbed-harness-environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function installChangeDetectionBatchingHandler(fixture: ComponentFixture<unknown
4949
handleChangeDetectionBatching(({isBatching, onDetectChangesNow}) => {
5050
disableAutoChangeDetection = isBatching;
5151
if (onDetectChangesNow) {
52-
Promise.all([...activeFixtures].map(detectChanges)).then(onDetectChangesNow);
52+
Promise.all(Array.from(activeFixtures).map(detectChanges)).then(onDetectChangesNow);
5353
}
5454
});
5555
}

tools/public_api_guard/cdk/testing.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export interface BaseHarnessFilters {
1111
selector?: string;
1212
}
1313

14+
export interface ChangeDetectionBatchingStatus {
15+
isBatching: boolean;
16+
onDetectChangesNow?: () => void;
17+
}
18+
1419
export declare abstract class ComponentHarness {
1520
protected readonly locatorFactory: LocatorFactory;
1621
constructor(locatorFactory: LocatorFactory);
@@ -42,6 +47,8 @@ export interface ElementDimensions {
4247
width: number;
4348
}
4449

50+
export declare function handleChangeDetectionBatching(handler: (status: ChangeDetectionBatchingStatus) => void): void;
51+
4552
export declare abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFactory {
4653
protected rawRootElement: E;
4754
rootElement: TestElement;
@@ -115,6 +122,12 @@ export interface ModifierKeys {
115122
shift?: boolean;
116123
}
117124

125+
export declare function noAutoChangeDetection<T>(fn: () => Promise<T>): Promise<T>;
126+
127+
export declare function parallel<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
128+
129+
export declare function stopHandlingChangeDetectionBatching(): void;
130+
118131
export interface TestElement {
119132
blur(): Promise<void>;
120133
clear(): Promise<void>;

0 commit comments

Comments
 (0)