Skip to content

Commit c690f6c

Browse files
committed
teach parser
1 parent 4b63886 commit c690f6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/installation/playwright-cdn.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const CDNS = [
2424
'https://cdn.playwright.dev',
2525
];
2626

27-
const DL_STAT_BLOCK = /^.*from url: (.*)$\n^.*to location: (.*)$\n^.*response status code: (.*)$\n^.*total bytes: (\d+)$\n^.*download complete, size: (\d+)$\n^.*SUCCESS downloading (\w+) .*$/gm;
27+
const DL_STAT_BLOCK = /^.*from url: (.*)$\n^.*to location: (.*)$\n^.*response status code: (.*)$\n^.*is chunked: (.*)$\n^.*total bytes: (\d+)$\n^.*download complete, size: (\d+)$\n^.*SUCCESS downloading (\w+) .*$/gm;
2828

2929
const parsedDownloads = (rawLogs: string) => {
3030
const out: { url: string, status: number, name: string }[] = [];
3131
for (const match of rawLogs.matchAll(DL_STAT_BLOCK)) {
32-
const [, url, /* filepath */, status, /* size */, /* receivedBytes */, name] = match;
32+
const [, url, /* filepath */, status, /* isChunked */, /* size */, /* receivedBytes */, name] = match;
3333
out.push({ url, status: Number.parseInt(status, 10), name: name.toLocaleLowerCase() });
3434
}
3535
return out;

0 commit comments

Comments
 (0)