| 15 | const log = console.log |
| 16 | |
| 17 | function getProviderOptions(): prompt.Choice[] { |
| 18 | const providers: Record<BrowserBuiltinProvider, string> = { |
| 19 | playwright: 'Playwright relies on Chrome DevTools protocol. Read more: https://playwright.dev', |
| 20 | webdriverio: 'WebdriverIO uses WebDriver protocol. Read more: https://webdriver.io', |
| 21 | preview: 'Preview is useful to quickly run your tests in the browser, but not suitable for CI.', |
| 22 | } |
| 23 | |
| 24 | return Object.entries(providers).map<prompt.Choice>(([provider, description]) => { |
| 25 | return { |
| 26 | title: provider, |
| 27 | description, |
| 28 | value: provider, |
| 29 | } |
| 30 | }) |
| 31 | } |
| 32 | |
| 33 | function getBrowserNames(provider: BrowserBuiltinProvider) { |
| 34 | switch (provider) { |