Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cdk/testing/harness-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ export abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFac
private async _getAllHarnessesAndTestElements<T extends (HarnessQuery<any> | string)[]>(
queries: T,
): Promise<LocatorFnResult<T>[]> {
if (!queries.length) {
throw Error('CDK Component harness query must contain at least one element.');
}

const {allQueries, harnessQueries, elementQueries, harnessTypes} = _parseQueries(queries);

// Combine all of the queries into one large comma-delimited selector and use it to get all raw
Expand Down