mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
Revert "chore: support narrow terminal windows for messages (#18714)"
This reverts commit 23171c5037
.
This commit is contained in:
parent
25605c616c
commit
4bbfcef792
@ -191,10 +191,12 @@ export function constructURLBasedOnBaseURL(baseURL: string | undefined, givenURL
|
||||
|
||||
export function wrapInASCIIBox(text: string, padding = 0): string {
|
||||
const lines = text.split('\n');
|
||||
const maxLineLength = Math.max(...lines.map(line => line.length));
|
||||
const separatorLength = process.stdout.columns || maxLineLength;
|
||||
const separator = '═'.repeat(separatorLength);
|
||||
return [separator, ...lines, separator, ''].join('\n');
|
||||
const maxLength = Math.max(...lines.map(line => line.length));
|
||||
return [
|
||||
'╔' + '═'.repeat(maxLength + padding * 2) + '╗',
|
||||
...lines.map(line => '║' + ' '.repeat(padding) + line + ' '.repeat(maxLength - line.length + padding) + '║'),
|
||||
'╚' + '═'.repeat(maxLength + padding * 2) + '╝',
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
export function isFilePayload(value: any): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user