[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.

chore: cleanup

Raul Macarie (Jul 21, 2026, 4:03 PM +0200) 8bbb4c8b 423290c2

+16 -18
+15 -2
packages/browser/src/client/tester/context.ts
··· 19 19 import { vi } from 'vitest' 20 20 import { __INTERNAL, stringify } from 'vitest/internal/browser' 21 21 import { ensureAwaited, getBrowserState, getWorkerState } from '../utils' 22 - import { isLocator, processTimeoutOptions, resolveUserEventPointerOptions, resolveUserEventWheelOptions, serializeElement } from './tester-utils' 22 + import { isLocator, processTimeoutOptions, resolveUserEventWheelOptions, serializeElement } from './tester-utils' 23 23 import { createBrowserTraceRangeId, recordBrowserTraceEntry } from './trace' 24 24 25 25 // this file should not import anything directly, only types and utils ··· 78 78 }, 79 79 pointer(options) { 80 80 return ensureAwaited<void>(async () => { 81 + const pointerOptions = await Promise.all(options.map(async (option) => { 82 + if ('target' in option && option.target) { 83 + const target = (await serializeElement(option.target)) 84 + 85 + return { 86 + ...option, 87 + target, 88 + } 89 + } 90 + 91 + return option 92 + })) 93 + 81 94 await triggerCommand<void>( 82 95 '__vitest_pointer', 83 - [await resolveUserEventPointerOptions(options)], 96 + [pointerOptions], 84 97 ) 85 98 }) 86 99 },
+1 -16
packages/browser/src/client/tester/tester-utils.ts
··· 1 - import type { Locator, SelectorOptions, SerializedLocator, SerializedUserEventPointerOptions, UserEventPointerOptions, UserEventWheelDeltaOptions, UserEventWheelOptions } from 'vitest/browser' 1 + import type { Locator, SelectorOptions, SerializedLocator, UserEventWheelDeltaOptions, UserEventWheelOptions } from 'vitest/browser' 2 2 import type { BrowserRPC } from '../client' 3 3 import type { BrowserTraceEntryStatus } from './trace' 4 4 import { __INTERNAL } from 'vitest/internal/browser' ··· 352 352 delta, 353 353 times: options.times, 354 354 } 355 - } 356 - 357 - export async function resolveUserEventPointerOptions(options: readonly UserEventPointerOptions[]): Promise<SerializedUserEventPointerOptions[]> { 358 - return await Promise.all(options.map(async (option) => { 359 - if ('target' in option && option.target) { 360 - const target = (await serializeElement(option.target)) 361 - 362 - return { 363 - ...option, 364 - target, 365 - } 366 - } 367 - 368 - return option 369 - })) 370 355 }