@vitest/browser 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
1
  {
2
- "_utils-Owv5OOOf.js": {
3
- "file": "__vitest_browser__/utils-Owv5OOOf.js",
2
+ "_utils-CBFLDkwI.js": {
3
+ "file": "__vitest_browser__/utils-CBFLDkwI.js",
4
4
  "name": "utils"
5
5
  },
6
6
  "orchestrator.html": {
7
- "file": "__vitest_browser__/orchestrator-BR1Ueh0Q.js",
7
+ "file": "__vitest_browser__/orchestrator-DeY4LJgz.js",
8
8
  "name": "orchestrator",
9
9
  "src": "orchestrator.html",
10
10
  "isEntry": true,
11
11
  "imports": [
12
- "_utils-Owv5OOOf.js"
12
+ "_utils-CBFLDkwI.js"
13
13
  ]
14
14
  },
15
15
  "tester/tester.html": {
16
- "file": "__vitest_browser__/tester-oUsZBBvV.js",
16
+ "file": "__vitest_browser__/tester-Cqa_buNy.js",
17
17
  "name": "tester",
18
18
  "src": "tester/tester.html",
19
19
  "isEntry": true,
20
20
  "imports": [
21
- "_utils-Owv5OOOf.js"
21
+ "_utils-CBFLDkwI.js"
22
22
  ]
23
23
  }
24
24
  }
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { g as getBrowserState, a as getConfig, r as relative } from "./utils-Owv5OOOf.js";
4
+ import { g as getBrowserState, a as getConfig, r as relative } from "./utils-CBFLDkwI.js";
5
5
  import { client, channel, globalChannel } from "@vitest/browser/client";
6
6
  function generateHash(str) {
7
7
  let hash = 0;
@@ -1,9 +1,9 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { a as getConfig, g as getBrowserState, b as resolve, e as executor, c as getWorkerState } from "./utils-Owv5OOOf.js";
4
+ import { a as getConfig, g as getBrowserState, b as resolve, e as executor, c as getWorkerState, C as CommandsManager } from "./utils-CBFLDkwI.js";
5
5
  import { globalChannel, client, onCancel, channel } from "@vitest/browser/client";
6
- import { userEvent, page } from "@vitest/browser/context";
6
+ import { userEvent, page, server } from "@vitest/browser/context";
7
7
  import { loadDiffConfig, loadSnapshotSerializers, takeCoverageInsideWorker, setupCommonEnv, startCoverageInsideWorker, startTests, collectTests, stopCoverageInsideWorker, SpyModule } from "vitest/browser";
8
8
  import { expect, chai } from "vitest";
9
9
  import { getSafeTimers, stringify, format, TraceMap, originalPositionFor } from "vitest/utils";
@@ -13045,6 +13045,11 @@ ${stack}`, true);
13045
13045
  function stdout(base) {
13046
13046
  return (...args) => {
13047
13047
  base(...args);
13048
+ if (args[0] === "[WDIO]") {
13049
+ if (args[1] === "newShadowRoot" || args[1] === "removeShadowRoot") {
13050
+ return;
13051
+ }
13052
+ }
13048
13053
  sendLog("stdout", processLog(args));
13049
13054
  };
13050
13055
  }
@@ -15366,6 +15371,7 @@ async function prepareTestEnvironment(files) {
15366
15371
  state.ctx.files = files;
15367
15372
  state.onCancel = onCancel;
15368
15373
  state.rpc = rpc2;
15374
+ getBrowserState().commands = new CommandsManager();
15369
15375
  const interceptor = createModuleMockerInterceptor();
15370
15376
  const mocker = new VitestBrowserClientMocker(
15371
15377
  interceptor,
@@ -15394,7 +15400,9 @@ async function prepareTestEnvironment(files) {
15394
15400
  return {
15395
15401
  runner,
15396
15402
  config,
15397
- state
15403
+ state,
15404
+ rpc: rpc2,
15405
+ commands: getBrowserState().commands
15398
15406
  };
15399
15407
  }
15400
15408
  function done(files) {
@@ -15425,9 +15433,25 @@ async function executeTests(method, files) {
15425
15433
  return;
15426
15434
  }
15427
15435
  debug("runner resolved successfully");
15428
- const { config, runner, state } = preparedData;
15436
+ const { config, runner, state, commands, rpc: rpc2 } = preparedData;
15429
15437
  state.durations.prepare = performance.now() - state.durations.prepare;
15430
15438
  debug("prepare time", state.durations.prepare, "ms");
15439
+ let contextSwitched = false;
15440
+ if (server.provider === "webdriverio") {
15441
+ let switchPromise = null;
15442
+ commands.onCommand(async () => {
15443
+ if (switchPromise) {
15444
+ await switchPromise;
15445
+ }
15446
+ if (!contextSwitched) {
15447
+ switchPromise = rpc2.wdioSwitchContext("iframe").finally(() => {
15448
+ switchPromise = null;
15449
+ contextSwitched = true;
15450
+ });
15451
+ await switchPromise;
15452
+ }
15453
+ });
15454
+ }
15431
15455
  try {
15432
15456
  await Promise.all([
15433
15457
  setupCommonEnv(config),
@@ -15454,6 +15478,9 @@ async function executeTests(method, files) {
15454
15478
  page[cleanupSymbol]();
15455
15479
  }
15456
15480
  await userEvent.cleanup();
15481
+ if (contextSwitched) {
15482
+ await rpc2.wdioSwitchContext("parent");
15483
+ }
15457
15484
  } catch (error) {
15458
15485
  await client.rpc.onUnhandledError({
15459
15486
  name: error.name,
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  (function polyfill() {
2
5
  const relList = document.createElement("link").relList;
3
6
  if (relList && relList.supports && relList.supports("modulepreload")) {
@@ -185,7 +188,27 @@ function getWorkerState() {
185
188
  }
186
189
  return state;
187
190
  }
191
+ class CommandsManager {
192
+ constructor() {
193
+ __publicField(this, "_listeners", []);
194
+ }
195
+ onCommand(listener) {
196
+ this._listeners.push(listener);
197
+ }
198
+ async triggerCommand(command, args) {
199
+ var _a, _b;
200
+ const state = /* @__PURE__ */ getWorkerState();
201
+ const rpc = state.rpc;
202
+ const { sessionId } = /* @__PURE__ */ getBrowserState();
203
+ const filepath = state.filepath || ((_b = (_a = state.current) == null ? void 0 : _a.file) == null ? void 0 : _b.filepath);
204
+ if (this._listeners.length) {
205
+ await Promise.all(this._listeners.map((listener) => listener(command, args)));
206
+ }
207
+ return rpc.triggerCommand(sessionId, command, filepath, args);
208
+ }
209
+ }
188
210
  export {
211
+ CommandsManager as C,
189
212
  getConfig as a,
190
213
  resolve as b,
191
214
  getWorkerState as c,
@@ -26,8 +26,8 @@
26
26
  {__VITEST_INJECTOR__}
27
27
  {__VITEST_ERROR_CATCHER__}
28
28
  {__VITEST_SCRIPTS__}
29
- <script type="module" crossorigin src="/__vitest_browser__/orchestrator-BR1Ueh0Q.js"></script>
30
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-Owv5OOOf.js">
29
+ <script type="module" crossorigin src="/__vitest_browser__/orchestrator-DeY4LJgz.js"></script>
30
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-CBFLDkwI.js">
31
31
  </head>
32
32
  <body>
33
33
  <div id="vitest-tester"></div>
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" href="{__VITEST_FAVICON__}" type="image/svg+xml">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Vitest Browser Tester</title>
8
- <script type="module" crossorigin src="/__vitest_browser__/tester-oUsZBBvV.js"></script>
9
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-Owv5OOOf.js">
8
+ <script type="module" crossorigin src="/__vitest_browser__/tester-Cqa_buNy.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-CBFLDkwI.js">
10
10
  </head>
11
11
  <body>
12
12
  </body>
package/dist/context.js CHANGED
@@ -113,14 +113,10 @@ function getParent(el) {
113
113
 
114
114
  const state = () => getWorkerState();
115
115
  const provider = __vitest_browser_runner__.provider;
116
- function filepath() {
117
- return getWorkerState().filepath || getWorkerState().current?.file?.filepath || void 0;
118
- }
119
- const rpc = () => getWorkerState().rpc;
120
116
  const sessionId = getBrowserState().sessionId;
121
117
  const channel = new BroadcastChannel(`vitest:${sessionId}`);
122
118
  function triggerCommand(command, ...args) {
123
- return rpc().triggerCommand(sessionId, command, filepath(), args);
119
+ return getBrowserState().commands.triggerCommand(command, args);
124
120
  }
125
121
  function createUserEvent(__tl_user_event_base__, options) {
126
122
  if (__tl_user_event_base__) {
@@ -135,6 +131,9 @@ function createUserEvent(__tl_user_event_base__, options) {
135
131
  return createUserEvent();
136
132
  },
137
133
  async cleanup() {
134
+ if (!keyboard.unreleased.length) {
135
+ return;
136
+ }
138
137
  return ensureAwaited(async () => {
139
138
  await triggerCommand("__vitest_cleanup", keyboard);
140
139
  keyboard.unreleased = [];
@@ -187,9 +186,7 @@ function createUserEvent(__tl_user_event_base__, options) {
187
186
  });
188
187
  },
189
188
  tab(options2 = {}) {
190
- return ensureAwaited(() => {
191
- return triggerCommand("__vitest_tab", options2);
192
- });
189
+ return ensureAwaited(() => triggerCommand("__vitest_tab", options2));
193
190
  },
194
191
  async keyboard(text) {
195
192
  return ensureAwaited(async () => {
@@ -250,21 +250,10 @@ class Locator {
250
250
  toJSON() {
251
251
  return this.selector;
252
252
  }
253
- get state() {
254
- return getBrowserState();
255
- }
256
- get worker() {
257
- return getWorkerState();
258
- }
259
- get rpc() {
260
- return this.worker.rpc;
261
- }
262
253
  triggerCommand(command, ...args) {
263
- const filepath = this.worker.filepath || this.worker.current?.file?.filepath || void 0;
264
- return ensureAwaited(() => this.rpc.triggerCommand(
265
- this.state.sessionId,
254
+ const commands = getBrowserState().commands;
255
+ return ensureAwaited(() => commands.triggerCommand(
266
256
  command,
267
- filepath,
268
257
  args
269
258
  ));
270
259
  }
package/dist/index.d.ts CHANGED
@@ -48,6 +48,7 @@ interface WebSocketBrowserHandlers {
48
48
  getBrowserFileSourceMap: (id: string) => SourceMap | null | {
49
49
  mappings: '';
50
50
  } | undefined;
51
+ wdioSwitchContext: (direction: 'iframe' | 'parent') => void;
51
52
  sendCdpEvent: (sessionId: string, event: string, payload?: Record<string, unknown>) => unknown;
52
53
  trackCdpEvent: (sessionId: string, type: 'on' | 'once' | 'off', event: string, listenerId: string) => void;
53
54
  }
package/dist/index.js CHANGED
@@ -11,12 +11,12 @@ import { fileURLToPath } from 'node:url';
11
11
  import crypto from 'node:crypto';
12
12
  import { mkdir, readFile as readFile$1 } from 'node:fs/promises';
13
13
  import { parseErrorStacktrace, parseStacktrace } from '@vitest/utils/source-map';
14
- import { P as PlaywrightBrowserProvider, W as WebdriverBrowserProvider } from './webdriver-kh_HHy0p.js';
14
+ import { P as PlaywrightBrowserProvider, W as WebdriverBrowserProvider } from './webdriver-C5-VI7VH.js';
15
15
  import { resolve as resolve$1, dirname as dirname$1, basename as basename$1, normalize as normalize$1 } from 'node:path';
16
16
  import { WebSocketServer } from 'ws';
17
17
  import * as nodeos from 'node:os';
18
18
 
19
- var version = "3.0.6";
19
+ var version = "3.0.7";
20
20
 
21
21
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
22
22
  function normalizeWindowsPath(input = "") {
@@ -548,11 +548,10 @@ function BrowserContext(globalServer) {
548
548
  }
549
549
  async function generateContextFile(globalServer) {
550
550
  const commands = Object.keys(globalServer.commands);
551
- const filepathCode = "__vitest_worker__.filepath || __vitest_worker__.current?.file?.filepath || undefined";
552
551
  const provider = [...globalServer.children][0].provider || { name: "preview" };
553
552
  const providerName = provider.name;
554
553
  const commandsCode = commands.filter((command) => !command.startsWith("__vitest")).map((command) => {
555
- return ` ["${command}"]: (...args) => rpc().triggerCommand(sessionId, "${command}", filepath(), args),`;
554
+ return ` ["${command}"]: (...args) => __vitest_browser_runner__.commands.triggerCommand("${command}", args),`;
556
555
  }).join("\n");
557
556
  const userEventNonProviderImport = await getUserEventImport(
558
557
  providerName,
@@ -562,9 +561,6 @@ async function generateContextFile(globalServer) {
562
561
  return `
563
562
  import { page, createUserEvent, cdp } from '${distContextPath}'
564
563
  ${userEventNonProviderImport}
565
- const filepath = () => ${filepathCode}
566
- const rpc = () => __vitest_worker__.rpc
567
- const sessionId = __vitest_browser_runner__.sessionId
568
564
 
569
565
  export const server = {
570
566
  platform: ${JSON.stringify(process.platform)},
@@ -2065,6 +2061,9 @@ const keyboard = async (context, text, state) => {
2065
2061
  };
2066
2062
  const keyboardCleanup = async (context, state) => {
2067
2063
  const { provider, sessionId } = context;
2064
+ if (!state.unreleased) {
2065
+ return;
2066
+ }
2068
2067
  if (provider instanceof PlaywrightBrowserProvider) {
2069
2068
  const page = provider.getPage(sessionId);
2070
2069
  for (const key of state.unreleased) {
@@ -2932,6 +2931,20 @@ function setupBrowserRpc(globalServer) {
2932
2931
  getCountOfFailedTests() {
2933
2932
  return vitest.state.getCountOfFailedTests();
2934
2933
  },
2934
+ async wdioSwitchContext(direction) {
2935
+ const provider = project.browser.provider;
2936
+ if (!provider) {
2937
+ throw new Error("Commands are only available for browser tests.");
2938
+ }
2939
+ if (provider.name !== "webdriverio") {
2940
+ throw new Error("Switch context is only available for WebDriverIO provider.");
2941
+ }
2942
+ if (direction === "iframe") {
2943
+ await provider.switchToTestFrame();
2944
+ } else {
2945
+ await provider.switchToMainFrame();
2946
+ }
2947
+ },
2935
2948
  async triggerCommand(sessionId, command, testPath, payload) {
2936
2949
  debug$1?.('[%s] Triggering command "%s"', sessionId, command);
2937
2950
  const provider = project.browser.provider;
@@ -2942,7 +2955,6 @@ function setupBrowserRpc(globalServer) {
2942
2955
  if (!commands || !commands[command]) {
2943
2956
  throw new Error(`Unknown command "${command}".`);
2944
2957
  }
2945
- await provider.beforeCommand?.(command, payload);
2946
2958
  const context = Object.assign(
2947
2959
  {
2948
2960
  testPath,
@@ -2953,13 +2965,7 @@ function setupBrowserRpc(globalServer) {
2953
2965
  },
2954
2966
  provider.getCommandsContext(sessionId)
2955
2967
  );
2956
- let result;
2957
- try {
2958
- result = await commands[command](context, ...payload);
2959
- } finally {
2960
- await provider.afterCommand?.(command, payload);
2961
- }
2962
- return result;
2968
+ return await commands[command](context, ...payload);
2963
2969
  },
2964
2970
  finishBrowserTests(sessionId) {
2965
2971
  debug$1?.("[%s] Finishing browser tests for session", sessionId);
@@ -258,9 +258,6 @@ declare abstract class Locator {
258
258
  last(): Locator;
259
259
  toString(): string;
260
260
  toJSON(): string;
261
- private get state();
262
- private get worker();
263
- private get rpc();
264
261
  protected triggerCommand<T>(command: string, ...args: any[]): Promise<T>;
265
262
  }
266
263
 
@@ -1,4 +1,4 @@
1
1
  import '@vitest/browser/context';
2
2
  import '../public-utils-J4vwTaki.js';
3
- export { L as Locator, s as selectorEngine } from '../index-D-kNWeee.js';
3
+ export { L as Locator, s as selectorEngine } from '../index-fqTesRIH.js';
4
4
  import 'vitest/utils';
@@ -1,6 +1,6 @@
1
1
  import { page, server } from '@vitest/browser/context';
2
2
  import { g as getByTitleSelector, a as getByTextSelector, b as getByPlaceholderSelector, c as getByAltTextSelector, d as getByTestIdSelector, e as getByRoleSelector, f as getByLabelSelector } from '../public-utils-J4vwTaki.js';
3
- import { s as selectorEngine, L as Locator } from '../index-D-kNWeee.js';
3
+ import { s as selectorEngine, L as Locator } from '../index-fqTesRIH.js';
4
4
  import 'vitest/utils';
5
5
 
6
6
  page.extend({
@@ -1,6 +1,6 @@
1
1
  import { page, server, userEvent } from '@vitest/browser/context';
2
2
  import { g as getByTitleSelector, a as getByTextSelector, b as getByPlaceholderSelector, c as getByAltTextSelector, d as getByTestIdSelector, e as getByRoleSelector, f as getByLabelSelector, h as getElementError } from '../public-utils-J4vwTaki.js';
3
- import { s as selectorEngine, L as Locator, c as convertElementToCssSelector } from '../index-D-kNWeee.js';
3
+ import { s as selectorEngine, L as Locator, c as convertElementToCssSelector } from '../index-fqTesRIH.js';
4
4
  import 'vitest/utils';
5
5
 
6
6
  page.extend({
@@ -1,6 +1,6 @@
1
1
  import { page, server } from '@vitest/browser/context';
2
2
  import { g as getByTitleSelector, a as getByTextSelector, b as getByPlaceholderSelector, c as getByAltTextSelector, d as getByTestIdSelector, e as getByRoleSelector, f as getByLabelSelector, h as getElementError } from '../public-utils-J4vwTaki.js';
3
- import { s as selectorEngine, L as Locator, c as convertElementToCssSelector } from '../index-D-kNWeee.js';
3
+ import { s as selectorEngine, L as Locator, c as convertElementToCssSelector } from '../index-fqTesRIH.js';
4
4
  import 'vitest/utils';
5
5
 
6
6
  page.extend({
package/dist/providers.js CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WebdriverBrowserProvider, P as PlaywrightBrowserProvider } from './webdriver-kh_HHy0p.js';
1
+ import { W as WebdriverBrowserProvider, P as PlaywrightBrowserProvider } from './webdriver-C5-VI7VH.js';
2
2
 
3
3
  class PreviewBrowserProvider {
4
4
  name = "preview";
@@ -186,16 +186,25 @@ class WebdriverBrowserProvider {
186
186
  this.browserName = browser;
187
187
  this.options = options;
188
188
  }
189
- async beforeCommand() {
189
+ async switchToTestFrame() {
190
190
  const page = this.browser;
191
- const iframe = await page.findElement(
192
- "css selector",
193
- "iframe[data-vitest]"
194
- );
195
- await page.switchToFrame(iframe);
191
+ if (page.switchFrame) {
192
+ await page.switchFrame(page.$("iframe[data-vitest]"));
193
+ } else {
194
+ const iframe = await page.findElement(
195
+ "css selector",
196
+ "iframe[data-vitest]"
197
+ );
198
+ await page.switchToFrame(iframe);
199
+ }
196
200
  }
197
- async afterCommand() {
198
- await this.browser.switchToParentFrame();
201
+ async switchToMainFrame() {
202
+ const page = this.browser;
203
+ if (page.switchFrame) {
204
+ await page.switchFrame(null);
205
+ } else {
206
+ await page.switchToParentFrame();
207
+ }
199
208
  }
200
209
  getCommandsContext() {
201
210
  return {
package/dummy.js ADDED
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/browser",
3
3
  "type": "module",
4
- "version": "3.0.6",
4
+ "version": "3.0.7",
5
5
  "description": "Browser running for Vitest",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -60,12 +60,13 @@
60
60
  "*.d.ts",
61
61
  "context.js",
62
62
  "dist",
63
+ "dummy.js",
63
64
  "providers"
64
65
  ],
65
66
  "peerDependencies": {
66
67
  "playwright": "*",
67
- "webdriverio": "*",
68
- "vitest": "3.0.6"
68
+ "webdriverio": "^7.0.0 || ^8.0.0 || ^9.0.0",
69
+ "vitest": "3.0.7"
69
70
  },
70
71
  "peerDependenciesMeta": {
71
72
  "playwright": {
@@ -82,19 +83,20 @@
82
83
  "@testing-library/dom": "^10.4.0",
83
84
  "@testing-library/user-event": "^14.6.1",
84
85
  "magic-string": "^0.30.17",
85
- "msw": "^2.7.0",
86
+ "msw": "^2.7.3",
86
87
  "sirv": "^3.0.1",
87
88
  "tinyrainbow": "^2.0.0",
88
- "ws": "^8.18.0",
89
- "@vitest/utils": "3.0.6",
90
- "@vitest/mocker": "3.0.6"
89
+ "ws": "^8.18.1",
90
+ "@vitest/mocker": "3.0.7",
91
+ "@vitest/utils": "3.0.7"
91
92
  },
92
93
  "devDependencies": {
93
94
  "@testing-library/jest-dom": "^6.6.3",
94
95
  "@types/ws": "^8.5.14",
95
- "@wdio/protocols": "^8.40.3",
96
+ "@wdio/protocols": "^9.7.0",
97
+ "@wdio/types": "^9.9.0",
96
98
  "birpc": "0.2.19",
97
- "flatted": "^3.3.2",
99
+ "flatted": "^3.3.3",
98
100
  "ivya": "^1.1.1",
99
101
  "mime": "^4.0.6",
100
102
  "pathe": "^2.0.3",
@@ -102,11 +104,11 @@
102
104
  "playwright": "^1.50.1",
103
105
  "playwright-core": "^1.50.1",
104
106
  "safaridriver": "^1.0.0",
105
- "webdriverio": "^8.42.0",
106
- "@vitest/runner": "3.0.6",
107
- "@vitest/ws-client": "3.0.6",
108
- "vitest": "3.0.6",
109
- "@vitest/ui": "3.0.6"
107
+ "webdriverio": "^9.10.0",
108
+ "@vitest/runner": "3.0.7",
109
+ "@vitest/ui": "3.0.7",
110
+ "@vitest/ws-client": "3.0.7",
111
+ "vitest": "3.0.7"
110
112
  },
111
113
  "scripts": {
112
114
  "build": "rimraf dist && pnpm build:node && pnpm build:client",
@@ -1,9 +1,11 @@
1
- import type { RemoteOptions, ClickOptions, DragAndDropOptions } from 'webdriverio'
1
+ import type { remote, ClickOptions, DragAndDropOptions } from 'webdriverio'
2
2
  import '../matchers.js'
3
3
  import type {} from "vitest/node"
4
4
 
5
5
  declare module 'vitest/node' {
6
- export interface BrowserProviderOptions extends Partial<RemoteOptions> {}
6
+ export interface BrowserProviderOptions extends Partial<
7
+ Parameters<typeof remote>[0]
8
+ > {}
7
9
 
8
10
  export interface UserEventClickOptions extends ClickOptions {}
9
11