chore: log formatting for single state (#27351)

Fixes formatting for "waiting for element to be  and stable".
This commit is contained in:
Yury Semikhatsky 2023-09-29 09:14:26 -07:00 committed by GitHub
parent 08e71fec5d
commit 0f14446518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -937,8 +937,8 @@ function compensateHalfIntegerRoundingError(point: types.Point) {
export type SchedulableTask<T> = (injectedScript: js.JSHandle<InjectedScript>) => Promise<js.JSHandle<InjectedScriptPoll<T>>>;
function joinWithAnd(strings: string[]): string {
if (strings.length < 1)
return strings.join(', ');
if (strings.length <= 1)
return strings.join('');
return strings.slice(0, strings.length - 1).join(', ') + ' and ' + strings[strings.length - 1];
}