Sha256: 25adb3e650b715fe96212f44890a5edbdd4a75dc03b4d907946cc91aa4940b66
Contents?: true
Size: 1.17 KB
Versions: 26
Compression:
Stored size: 1.17 KB
Contents
import { W as WebdriverBrowserProvider, P as PlaywrightBrowserProvider } from './webdriver-Cv9wga63.js'; class PreviewBrowserProvider { name = "preview"; supportsParallelism = false; ctx; open = false; getSupportedBrowsers() { return []; } isOpen() { return this.open; } getCommandsContext() { return {}; } async initialize(ctx) { this.ctx = ctx; this.open = false; if (ctx.config.browser.headless) { throw new Error( `You've enabled headless mode for "preview" provider but it doesn't support it. Use "playwright" or "webdriverio" instead: https://vitest.dev/guide/browser/#configuration` ); } } async openPage(_contextId, url) { this.open = true; if (!this.ctx.browser) { throw new Error("Browser is not initialized"); } const options = this.ctx.browser.vite.config.server; const _open = options.open; options.open = url; this.ctx.browser.vite.openBrowser(); options.open = _open; } async close() { } } const webdriverio = WebdriverBrowserProvider; const playwright = PlaywrightBrowserProvider; const preview = PreviewBrowserProvider; export { playwright, preview, webdriverio };
Version data entries
26 entries across 26 versions & 1 rubygems