fix(install): generate new protocol.d.ts when browsers are downloaded (#149)

This commit is contained in:
Joel Einbinder 2019-12-05 11:21:55 -08:00 committed by Yury Semikhatsky
parent d4f0084f67
commit 4478c653fd
2 changed files with 3 additions and 3 deletions

View File

@ -446,8 +446,6 @@ const iPhone = playwright.devices['iPhone 6'];
Downloads the default browser that Playwright controls. The browser is usually around 100mb.
> **NOTE** Depending on your terminal, the progress bar might not appear.
#### playwright.errors
- returns: <[Object]>
- `TimeoutError` <[function]> A class of [TimeoutError].

View File

@ -8,7 +8,9 @@ export async function download(
revision: string,
browserName: string,
{onProgress}: {onProgress?: (downloadedBytes: number, totalBytes: number) => void} = {}) : Promise<RevisionInfo> {
return await browserFetcher.download(revision, onProgress);
const revisionInfo = browserFetcher.revisionInfo(revision);
await browserFetcher.download(revision, onProgress);
return revisionInfo;
}
export type RevisionInfo = {