[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix(browser): fix provider options types (#7115)

authored by

Hiroshi Ogawa and committed by
GitHub
(Dec 23, 2024, 9:34 AM +0100) 579bda97 843a621e

+32 -4
+2 -1
test/dts-playwright/tsconfig.json
··· 3 3 "target": "ESNext", 4 4 "module": "ESNext", 5 5 "moduleResolution": "Bundler", 6 + "types": ["@vitest/browser/providers/playwright"], 6 7 "strict": true, 7 8 "noEmit": true 8 9 }, 9 - "include": ["src"] 10 + "include": ["src", "*.ts"] 10 11 }
+26
test/dts-playwright/vite.config.ts
··· 1 + import { defineConfig } from 'vitest/config' 2 + 3 + export default defineConfig({ 4 + test: { 5 + browser: { 6 + provider: 'playwright', 7 + providerOptions: { 8 + launch: { 9 + timeout: 1234, 10 + // @ts-expect-error test type error 11 + slowMo: 'wrong', 12 + }, 13 + }, 14 + instances: [ 15 + { 16 + browser: 'chromium', 17 + launch: { 18 + timeout: 1234, 19 + // @ts-expect-error test type error 20 + slowMo: 'wrong', 21 + }, 22 + }, 23 + ], 24 + }, 25 + }, 26 + })
+2 -1
packages/browser/providers/playwright.d.ts
··· 9 9 } from 'playwright' 10 10 import { Protocol } from 'playwright-core/types/protocol' 11 11 import '../matchers.js' 12 + import type {} from "vitest/node" 12 13 13 14 declare module 'vitest/node' { 14 - interface BrowserProviderOptions { 15 + export interface BrowserProviderOptions { 15 16 launch?: LaunchOptions 16 17 context?: Omit< 17 18 BrowserContextOptions,
+2 -1
packages/browser/providers/webdriverio.d.ts
··· 1 1 import type { RemoteOptions, ClickOptions, DragAndDropOptions } from 'webdriverio' 2 2 import '../matchers.js' 3 + import type {} from "vitest/node" 3 4 4 5 declare module 'vitest/node' { 5 - interface BrowserProviderOptions extends Partial<RemoteOptions> {} 6 + export interface BrowserProviderOptions extends Partial<RemoteOptions> {} 6 7 7 8 export interface UserEventClickOptions extends ClickOptions {} 8 9
-1
test/dts-playwright/src/basic.test.ts
··· 1 - /// <reference types="@vitest/browser/providers/playwright" /> 2 1 import { page, userEvent } from '@vitest/browser/context' 3 2 import { test } from 'vitest' 4 3