vite-plus 0.1.24 → 0.2.0

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.
Files changed (174) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +8 -6
  3. package/bin/oxfmt +5 -2
  4. package/bin/oxlint +12 -2
  5. package/binding/index.cjs +84 -67
  6. package/binding/index.d.cts +155 -4
  7. package/dist/{agent-Nuk-9l77.js → agent-BD31CsvU.js} +941 -70
  8. package/dist/bin.js +22 -30
  9. package/dist/{compat-DXZgnEyq.js → compat-Cql3K40m.js} +1 -1
  10. package/dist/config/bin.js +30 -14
  11. package/dist/constants-CrfJQIUX.js +66 -0
  12. package/dist/create/bin.d.ts +6 -0
  13. package/dist/create/bin.js +508 -232
  14. package/dist/define-config-2tfJoXr1.d.ts +305 -0
  15. package/dist/define-config-BGSjF6Xp.cjs +488 -0
  16. package/dist/define-config-DJUehepE.js +445 -0
  17. package/dist/define-config.cjs +8 -1
  18. package/dist/define-config.d.ts +2 -2
  19. package/dist/define-config.js +2 -2
  20. package/dist/dist-DRJUd9bL.js +3 -0
  21. package/dist/{dist-BgQuvbtq.js → dist-Oxo16Y0q.js} +4 -4
  22. package/dist/index.cjs +9 -4
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.js +3 -3
  25. package/dist/{main-DpJl3LoU.js → json-Dn87fvjk.js} +137 -1
  26. package/dist/migration/bin.js +292 -76
  27. package/dist/{oxlint-plugin-config-B89iKTKN.js → oxlint-plugin-config-q8a5PFch.js} +1 -1
  28. package/dist/oxlint-plugin.js +11 -3
  29. package/dist/pack-bin.js +44 -15
  30. package/dist/{package-PmBUZ-ve.js → package-BHirM1_v.js} +3 -138
  31. package/dist/{report-DgSBQUdz.js → report-BHSkWqRR.js} +2 -0
  32. package/dist/{resolve-vite-config-TTvhycU1.js → resolve-vite-config-CmdsfQzS.js} +13 -4
  33. package/dist/staged/bin.js +3 -3
  34. package/dist/test/_at-vitest-browser/context.d.ts +2 -0
  35. package/dist/test/_at-vitest-browser.d.ts +2 -0
  36. package/dist/test/browser/context.d.ts +2 -2
  37. package/dist/test/browser/context.js +1 -1
  38. package/dist/test/browser/providers/playwright/context.d.ts +1 -0
  39. package/dist/test/browser/providers/playwright/context.js +1 -0
  40. package/dist/test/browser/providers/playwright.d.ts +124 -2
  41. package/dist/test/browser/providers/playwright.js +1 -1
  42. package/dist/test/browser/providers/preview/context.d.ts +1 -0
  43. package/dist/test/browser/providers/preview/context.js +1 -0
  44. package/dist/test/browser/providers/preview.d.ts +32 -2
  45. package/dist/test/browser/providers/preview.js +1 -1
  46. package/dist/test/browser/providers/webdriverio/context.d.ts +1 -0
  47. package/dist/test/browser/providers/webdriverio/context.js +1 -0
  48. package/dist/test/browser/providers/webdriverio.d.ts +77 -2
  49. package/dist/test/browser/providers/webdriverio.js +1 -1
  50. package/dist/test/browser-compat.d.ts +2 -0
  51. package/dist/test/browser-compat.js +1 -1
  52. package/dist/test/browser-playwright/context.d.ts +1 -0
  53. package/dist/test/browser-playwright/context.js +1 -0
  54. package/dist/test/browser-playwright.d.ts +124 -2
  55. package/dist/test/browser-playwright.js +1 -1
  56. package/dist/test/browser-preview/context.d.ts +1 -0
  57. package/dist/test/browser-preview/context.js +1 -0
  58. package/dist/test/browser-preview.d.ts +32 -2
  59. package/dist/test/browser-preview.js +1 -1
  60. package/dist/test/browser-webdriverio/context.d.ts +1 -0
  61. package/dist/test/browser-webdriverio/context.js +1 -0
  62. package/dist/test/browser-webdriverio.d.ts +77 -2
  63. package/dist/test/browser-webdriverio.js +1 -1
  64. package/dist/test/browser.d.ts +2 -2
  65. package/dist/test/browser.js +1 -1
  66. package/dist/test/client.js +1 -1
  67. package/dist/test/config.cjs +1 -1
  68. package/dist/test/config.d.ts +2 -2
  69. package/dist/test/config.js +1 -1
  70. package/dist/test/context.d.ts +942 -2
  71. package/dist/test/context.js +1 -1
  72. package/dist/test/coverage.d.ts +2 -2
  73. package/dist/test/coverage.js +1 -1
  74. package/dist/test/environments.d.ts +2 -2
  75. package/dist/test/environments.js +1 -1
  76. package/dist/test/globals.d.ts +2 -2
  77. package/dist/test/import-meta.d.ts +2 -2
  78. package/dist/test/importMeta.d.ts +2 -2
  79. package/dist/test/index.cjs +1 -1
  80. package/dist/test/index.d.cts +2 -2
  81. package/dist/test/index.d.ts +2 -2
  82. package/dist/test/index.js +1 -1
  83. package/dist/test/internal/browser.d.ts +2 -2
  84. package/dist/test/internal/browser.js +1 -1
  85. package/dist/test/jsdom.d.ts +2 -2
  86. package/dist/test/locators.d.ts +294 -0
  87. package/dist/test/locators.js +1 -1
  88. package/dist/test/matchers.d.ts +29 -0
  89. package/dist/test/matchers.js +1 -1
  90. package/dist/test/node.d.ts +2 -2
  91. package/dist/test/node.js +1 -1
  92. package/dist/test/optional-runtime-types.js.d.ts +2 -2
  93. package/dist/test/optional-types.js.d.ts +2 -2
  94. package/dist/test/plugins/browser-client.js +1 -1
  95. package/dist/test/plugins/browser-context.js +1 -1
  96. package/dist/test/plugins/browser-locators.js +1 -1
  97. package/dist/test/plugins/browser-playwright.js +1 -1
  98. package/dist/test/plugins/browser-preview.js +1 -1
  99. package/dist/test/plugins/browser-webdriverio.js +1 -1
  100. package/dist/test/plugins/browser.js +1 -1
  101. package/dist/test/plugins/expect.js +1 -1
  102. package/dist/test/plugins/mocker-automock.js +1 -1
  103. package/dist/test/plugins/mocker-browser.js +1 -1
  104. package/dist/test/plugins/mocker-node.js +1 -1
  105. package/dist/test/plugins/mocker-redirect.js +1 -1
  106. package/dist/test/plugins/mocker-register.js +1 -1
  107. package/dist/test/plugins/mocker-transforms.js +1 -1
  108. package/dist/test/plugins/mocker.js +1 -1
  109. package/dist/test/plugins/pretty-format.js +1 -1
  110. package/dist/test/plugins/runner-types.js +1 -1
  111. package/dist/test/plugins/runner-utils.js +1 -1
  112. package/dist/test/plugins/runner.js +1 -1
  113. package/dist/test/plugins/snapshot-environment.js +1 -1
  114. package/dist/test/plugins/snapshot-manager.js +1 -1
  115. package/dist/test/plugins/snapshot.js +1 -1
  116. package/dist/test/plugins/spy.js +1 -1
  117. package/dist/test/plugins/utils-constants.js +1 -1
  118. package/dist/test/plugins/utils-diff.js +1 -1
  119. package/dist/test/plugins/utils-display.js +1 -1
  120. package/dist/test/plugins/utils-error.js +1 -1
  121. package/dist/test/plugins/utils-helpers.js +1 -1
  122. package/dist/test/plugins/utils-offset.js +1 -1
  123. package/dist/test/plugins/utils-resolver.js +1 -1
  124. package/dist/test/plugins/utils-serialize.js +1 -1
  125. package/dist/test/plugins/utils-source-map-node.js +1 -1
  126. package/dist/test/plugins/utils-source-map.js +1 -1
  127. package/dist/test/plugins/utils-timers.js +1 -1
  128. package/dist/test/plugins/utils.js +1 -1
  129. package/dist/test/reporters.d.ts +2 -2
  130. package/dist/test/reporters.js +1 -1
  131. package/dist/test/runners.d.ts +2 -2
  132. package/dist/test/runners.js +1 -1
  133. package/dist/test/runtime.d.ts +2 -2
  134. package/dist/test/runtime.js +1 -1
  135. package/dist/test/snapshot.d.ts +2 -2
  136. package/dist/test/snapshot.js +1 -1
  137. package/dist/test/suite.d.ts +2 -2
  138. package/dist/test/suite.js +1 -1
  139. package/dist/test/utils.js +1 -1
  140. package/dist/test/worker.d.ts +2 -2
  141. package/dist/test/worker.js +1 -1
  142. package/dist/{tsconfig-DFb5BKyT.js → tsconfig-CJ_StdFc.js} +563 -229
  143. package/dist/tsgolint-path-B-yOos8p.js +32 -0
  144. package/dist/tsgolint-path.d.ts +8 -0
  145. package/dist/tsgolint-path.js +2 -0
  146. package/dist/version.js +3 -3
  147. package/dist/versions.d.ts +1 -1
  148. package/dist/versions.js +6 -6
  149. package/dist/{workspace-NL-m9wgM.js → workspace-Cjoc1c_A.js} +11 -9
  150. package/docs/_data/team.ts +2 -1
  151. package/docs/config/create.md +36 -1
  152. package/docs/config/index.md +7 -5
  153. package/docs/guide/commit-hooks.md +9 -0
  154. package/docs/guide/create.md +106 -2
  155. package/docs/guide/env.md +33 -5
  156. package/docs/guide/index.md +5 -3
  157. package/docs/guide/install.md +31 -12
  158. package/docs/guide/migrate.md +13 -3
  159. package/docs/guide/troubleshooting.md +2 -2
  160. package/docs/guide/upgrade.md +26 -7
  161. package/docs/package.json +3 -3
  162. package/docs/pnpm-lock.yaml +298 -395
  163. package/package.json +103 -55
  164. package/templates/generator/bin/index.ts +6 -3
  165. package/templates/generator/package.json +2 -3
  166. package/templates/generator/src/template.ts +0 -2
  167. package/templates/monorepo/package.json +1 -1
  168. package/dist/constants-DCBWlNrn.js +0 -33
  169. package/dist/define-config-BR1Y88zz.cjs +0 -84
  170. package/dist/define-config-BRC7qPNE.js +0 -21
  171. package/dist/define-config-COdn-tsn.d.ts +0 -177
  172. package/dist/dist-Bapm49IR.js +0 -3
  173. package/dist/test/plugins/utils-highlight.js +0 -1
  174. /package/dist/{chunk-DnnnRqeS.js → rolldown-runtime-DnnnRqeS.js} +0 -0
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/context';
1
+ export * from '@vitest/browser/context';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/coverage';
2
- export * from '@voidzero-dev/vite-plus-test/coverage';
1
+ import 'vitest/coverage';
2
+ export * from 'vitest/coverage';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/coverage';
1
+ export * from 'vitest/coverage';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/environments';
2
- export * from '@voidzero-dev/vite-plus-test/environments';
1
+ import 'vitest/environments';
2
+ export * from 'vitest/environments';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/environments';
1
+ export * from 'vitest/environments';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/globals';
2
- export * from '@voidzero-dev/vite-plus-test/globals';
1
+ import 'vitest/globals';
2
+ export * from 'vitest/globals';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/import-meta';
2
- export * from '@voidzero-dev/vite-plus-test/import-meta';
1
+ import 'vitest/import-meta';
2
+ export * from 'vitest/import-meta';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/importMeta';
2
- export * from '@voidzero-dev/vite-plus-test/importMeta';
1
+ import 'vitest/importMeta';
2
+ export * from 'vitest/importMeta';
@@ -1 +1 @@
1
- module.exports = require('@voidzero-dev/vite-plus-test');
1
+ module.exports = require('vitest');
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test';
2
- export * from '@voidzero-dev/vite-plus-test';
1
+ import 'vitest';
2
+ export * from 'vitest';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test';
2
- export * from '@voidzero-dev/vite-plus-test';
1
+ import 'vitest';
2
+ export * from 'vitest';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test';
1
+ export * from 'vitest';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/internal/browser';
2
- export * from '@voidzero-dev/vite-plus-test/internal/browser';
1
+ import 'vitest/internal/browser';
2
+ export * from 'vitest/internal/browser';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/internal/browser';
1
+ export * from 'vitest/internal/browser';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/jsdom';
2
- export * from '@voidzero-dev/vite-plus-test/jsdom';
1
+ import 'vitest/jsdom';
2
+ export * from 'vitest/jsdom';
@@ -0,0 +1,294 @@
1
+ import { UserEventClickOptions, UserEventWheelOptions, UserEventClearOptions, UserEventHoverOptions, UserEventFillOptions, UserEventUploadOptions, UserEventDragAndDropOptions, UserEventSelectOptions, LocatorScreenshotOptions, MarkOptions, LocatorByRoleOptions, LocatorOptions, SelectorOptions } from './browser';
2
+
3
+ //#region src/cssParser.d.ts
4
+ type ClauseCombinator = '' | '>' | '+' | '~' | '>=';
5
+ type CSSFunctionArgument = CSSComplexSelector | number | string;
6
+ interface CSSFunction {
7
+ name: string;
8
+ args: CSSFunctionArgument[];
9
+ }
10
+ interface CSSSimpleSelector {
11
+ css?: string;
12
+ functions: CSSFunction[];
13
+ }
14
+ interface CSSComplexSelector {
15
+ simples: {
16
+ selector: CSSSimpleSelector;
17
+ combinator: ClauseCombinator;
18
+ }[];
19
+ }
20
+ type CSSComplexSelectorList = CSSComplexSelector[];
21
+ //#endregion
22
+ //#region src/selectorParser.d.ts
23
+ interface NestedSelectorBody {
24
+ parsed: ParsedSelector;
25
+ distance?: number;
26
+ }
27
+ interface ParsedSelectorPart {
28
+ name: string;
29
+ body: string | CSSComplexSelectorList | NestedSelectorBody;
30
+ source: string;
31
+ }
32
+ interface ParsedSelector {
33
+ parts: ParsedSelectorPart[];
34
+ capture?: number;
35
+ }
36
+ //#endregion
37
+ //#region src/selectorGenerator.d.ts
38
+ interface GenerateSelectorOptions {
39
+ testIdAttributeName: string;
40
+ }
41
+ //#endregion
42
+ //#region src/selectorUtils.d.ts
43
+ interface ElementText {
44
+ full: string;
45
+ normalized: string;
46
+ immediate: string[];
47
+ }
48
+ //#endregion
49
+ //#region src/selectorEvaluator.d.ts
50
+ interface QueryContext {
51
+ scope: Element | Document;
52
+ pierceShadow: boolean;
53
+ originalScope?: Element | Document;
54
+ }
55
+ type Selector = any;
56
+ interface SelectorEvaluator {
57
+ query: (context: QueryContext, selector: Selector) => Element[];
58
+ matches: (element: Element, selector: Selector, context: QueryContext) => boolean;
59
+ }
60
+ interface SelectorEngine$1 {
61
+ matches?: (element: Element, args: (string | number | Selector)[], context: QueryContext, evaluator: SelectorEvaluator) => boolean;
62
+ query?: (context: QueryContext, args: (string | number | Selector)[], evaluator: SelectorEvaluator) => Element[];
63
+ }
64
+ declare class SelectorEvaluatorImpl implements SelectorEvaluator {
65
+ private _engines;
66
+ private _cacheQueryCSS;
67
+ private _cacheMatches;
68
+ private _cacheQuery;
69
+ private _cacheMatchesSimple;
70
+ private _cacheMatchesParents;
71
+ private _cacheCallMatches;
72
+ private _cacheCallQuery;
73
+ private _cacheQuerySimple;
74
+ _cacheText: Map<Element | ShadowRoot, ElementText>;
75
+ private _scoreMap;
76
+ private _retainCacheCounter;
77
+ constructor(extraEngines: Map<string, SelectorEngine$1>);
78
+ begin(): void;
79
+ end(): void;
80
+ private _cached;
81
+ private _checkSelector;
82
+ matches(element: Element, s: Selector, context: QueryContext): boolean;
83
+ query(context: QueryContext, s: any): Element[];
84
+ _markScore(element: Element, score: number): void;
85
+ private _hasScopeClause;
86
+ private _expandContextForScopeMatching;
87
+ private _matchesSimple;
88
+ private _querySimple;
89
+ private _matchesParents;
90
+ private _matchesEngine;
91
+ private _queryEngine;
92
+ private _callMatches;
93
+ private _callQuery;
94
+ private _matchesCSS;
95
+ _queryCSS(context: QueryContext, css: string): Element[];
96
+ private _getEngine;
97
+ }
98
+ //#endregion
99
+ //#region src/locatorUtils.d.ts
100
+ /**
101
+ * Copyright (c) Microsoft Corporation.
102
+ *
103
+ * Licensed under the Apache License, Version 2.0 (the "License");
104
+ * you may not use this file except in compliance with the License.
105
+ * You may obtain a copy of the License at
106
+ *
107
+ * http://www.apache.org/licenses/LICENSE-2.0
108
+ *
109
+ * Unless required by applicable law or agreed to in writing, software
110
+ * distributed under the License is distributed on an "AS IS" BASIS,
111
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112
+ * See the License for the specific language governing permissions and
113
+ * limitations under the License.
114
+ */
115
+ interface ByRoleOptions {
116
+ checked?: boolean;
117
+ disabled?: boolean;
118
+ exact?: boolean;
119
+ expanded?: boolean;
120
+ includeHidden?: boolean;
121
+ level?: number;
122
+ name?: string | RegExp;
123
+ pressed?: boolean;
124
+ selected?: boolean;
125
+ }
126
+ declare function getByTestIdSelector(testIdAttributeName: string, testId: string | RegExp): string;
127
+ declare function getByLabelSelector(text: string | RegExp, options?: {
128
+ exact?: boolean;
129
+ }): string;
130
+ declare function getByAltTextSelector(text: string | RegExp, options?: {
131
+ exact?: boolean;
132
+ }): string;
133
+ declare function getByTitleSelector(text: string | RegExp, options?: {
134
+ exact?: boolean;
135
+ }): string;
136
+ declare function getByPlaceholderSelector(text: string | RegExp, options?: {
137
+ exact?: boolean;
138
+ }): string;
139
+ declare function getByTextSelector(text: string | RegExp, options?: {
140
+ exact?: boolean;
141
+ }): string;
142
+ declare function getByRoleSelector(role: string, options?: ByRoleOptions): string;
143
+ //#endregion
144
+ //#region src/ivya.d.ts
145
+ interface IvyaOptions {
146
+ testIdAttribute: string;
147
+ browser: 'webkit' | 'chromium' | 'firefox';
148
+ exact: boolean;
149
+ }
150
+ interface IvyaConfiguration {
151
+ testIdAttribute?: string;
152
+ exact?: boolean;
153
+ browser: 'webkit' | 'chromium' | 'firefox';
154
+ }
155
+ declare class Ivya {
156
+ /** @internal */
157
+ _engines: Map<string, SelectorEngine>;
158
+ /** @internal */
159
+ _evaluator: SelectorEvaluatorImpl;
160
+ static options: IvyaOptions;
161
+ private static singleton;
162
+ static create(options: IvyaConfiguration): Ivya;
163
+ private constructor();
164
+ queryLocatorSelector(locator: string, root?: Node, strict?: boolean): Element | null;
165
+ queryLocatorSelectorAll(locator: string, root?: Node): Element[];
166
+ querySelector(selector: ParsedSelector, root: Node, strict?: boolean): Element | null;
167
+ queryAllByRole(text: string, options?: ByRoleOptions, container?: Node): Element[];
168
+ queryAllByLabelText(text: string | RegExp, options?: {
169
+ exact?: boolean;
170
+ }, container?: Node): Element[];
171
+ queryAllByTestId(text: string | RegExp, container?: Node): Element[];
172
+ queryAllByText(text: string | RegExp, options?: {
173
+ exact?: boolean;
174
+ }, container?: Node): Element[];
175
+ queryAllByTitle(text: string | RegExp, options?: {
176
+ exact?: boolean;
177
+ }, container?: Node): Element[];
178
+ queryAllByPlaceholder(text: string | RegExp, options?: {
179
+ exact?: boolean;
180
+ }, container?: Node): Element[];
181
+ queryAllByAltText(text: string | RegExp, options?: {
182
+ exact?: boolean;
183
+ }, container?: Node): Element[];
184
+ queryByRole(text: string, options?: ByRoleOptions, container?: Node): Element | null;
185
+ queryByLabelText(text: string | RegExp, options?: {
186
+ exact?: boolean;
187
+ }, container?: Node): Element | null;
188
+ queryByTestId(text: string | RegExp, container?: Node): Element | null;
189
+ queryByText(text: string | RegExp, options?: {
190
+ exact?: boolean;
191
+ }, container?: Node): Element | null;
192
+ queryByTitle(text: string | RegExp, options?: {
193
+ exact?: boolean;
194
+ }, container?: Node): Element | null;
195
+ queryByPlaceholder(text: string | RegExp, options?: {
196
+ exact?: boolean;
197
+ }, container?: Node): Element | null;
198
+ queryByAltText(text: string | RegExp, options?: {
199
+ exact?: boolean;
200
+ }, container?: Node): Element | null;
201
+ private strictModeViolationError;
202
+ generateSelectorSimple(targetElement: Element, options?: GenerateSelectorOptions): string;
203
+ parseSelector(selector: string): ParsedSelector;
204
+ previewNode(node: Node): string;
205
+ querySelectorAll(selector: ParsedSelector, root: Node): Element[];
206
+ private _queryEngineAll;
207
+ private _queryNth;
208
+ private _queryLayoutSelector;
209
+ private createStacklessError;
210
+ private _createTextEngine;
211
+ private _createAttributeEngine;
212
+ private _createCSSEngine;
213
+ private _createNamedAttributeEngine;
214
+ private _createVisibleEngine;
215
+ private _createControlEngine;
216
+ private _createHasEngine;
217
+ private _createHasNotEngine;
218
+ private _createInternalChainEngine;
219
+ private _createInternalLabelEngine;
220
+ private _createInternalHasTextEngine;
221
+ private _createInternalHasNotTextEngine;
222
+ }
223
+ type SelectorRoot = Element | ShadowRoot | Document;
224
+ interface SelectorEngine {
225
+ queryAll: (root: SelectorRoot, selector: string | any) => Element[];
226
+ }
227
+
228
+ declare function convertElementToCssSelector(element: Element): string;
229
+ declare function processTimeoutOptions<T extends {
230
+ timeout?: number;
231
+ }>(options_: T | undefined): T | undefined;
232
+ declare function getIframeScale(): number;
233
+
234
+ declare function ensureAwaited<T>(promise: (error?: Error) => Promise<T>): Promise<T>;
235
+
236
+ declare const selectorEngine: Ivya;
237
+ declare abstract class Locator {
238
+ abstract selector: string;
239
+ private _parsedSelector;
240
+ protected _container?: Element | undefined;
241
+ protected _pwSelector?: string | undefined;
242
+ protected _errorSource?: Error;
243
+ constructor();
244
+ click(options?: UserEventClickOptions): Promise<void>;
245
+ dblClick(options?: UserEventClickOptions): Promise<void>;
246
+ tripleClick(options?: UserEventClickOptions): Promise<void>;
247
+ wheel(options: UserEventWheelOptions): Promise<void>;
248
+ clear(options?: UserEventClearOptions): Promise<void>;
249
+ hover(options?: UserEventHoverOptions): Promise<void>;
250
+ unhover(options?: UserEventHoverOptions): Promise<void>;
251
+ fill(text: string, options?: UserEventFillOptions): Promise<void>;
252
+ upload(files: string | string[] | File | File[], options?: UserEventUploadOptions): Promise<void>;
253
+ dropTo(target: Locator, options?: UserEventDragAndDropOptions): Promise<void>;
254
+ selectOptions(value: HTMLElement | HTMLElement[] | Locator | Locator[] | string | string[], options?: UserEventSelectOptions): Promise<void>;
255
+ screenshot(options: Omit<LocatorScreenshotOptions, "base64"> & {
256
+ base64: true;
257
+ }): Promise<{
258
+ path: string;
259
+ base64: string;
260
+ }>;
261
+ screenshot(options?: LocatorScreenshotOptions): Promise<string>;
262
+ mark(name: string, options?: MarkOptions): Promise<void>;
263
+ protected abstract locator(selector: string): Locator;
264
+ protected abstract elementLocator(element: Element): Locator;
265
+ getByRole(role: string, options?: LocatorByRoleOptions): Locator;
266
+ getByAltText(text: string | RegExp, options?: LocatorOptions): Locator;
267
+ getByLabelText(text: string | RegExp, options?: LocatorOptions): Locator;
268
+ getByPlaceholder(text: string | RegExp, options?: LocatorOptions): Locator;
269
+ getByTestId(testId: string | RegExp): Locator;
270
+ getByText(text: string | RegExp, options?: LocatorOptions): Locator;
271
+ getByTitle(title: string | RegExp, options?: LocatorOptions): Locator;
272
+ filter(filter: LocatorOptions): Locator;
273
+ and(locator: Locator): Locator;
274
+ or(locator: Locator): Locator;
275
+ query(): HTMLElement | SVGElement | null;
276
+ element(): HTMLElement | SVGElement;
277
+ elements(): (HTMLElement | SVGElement)[];
278
+ get length(): number;
279
+ all(): Locator[];
280
+ nth(index: number): Locator;
281
+ first(): Locator;
282
+ last(): Locator;
283
+ toString(): string;
284
+ toJSON(): string;
285
+ findElement(options_?: SelectorOptions): Promise<HTMLElement | SVGElement>;
286
+ protected triggerCommand<T>(command: string, ...args: any[]): Promise<T>;
287
+ }
288
+ declare function triggerCommandWithTrace<T>(options: {
289
+ name: string;
290
+ arguments: unknown[];
291
+ errorSource?: Error | undefined;
292
+ }): Promise<T>;
293
+
294
+ export { Locator, convertElementToCssSelector, ensureAwaited, getByAltTextSelector, getByLabelSelector, getByPlaceholderSelector, getByRoleSelector, getByTestIdSelector, getByTextSelector, getByTitleSelector, getIframeScale, processTimeoutOptions, selectorEngine, triggerCommandWithTrace };
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/locators';
1
+ export * from '@vitest/browser/locators';
@@ -0,0 +1,29 @@
1
+ import type { Locator } from './context.js'
2
+ import type { TestingLibraryMatchers } from './jest-dom.js'
3
+ import type { Assertion, ExpectPollOptions } from 'vitest'
4
+
5
+ declare module 'vitest' {
6
+ interface JestAssertion<T = any> extends TestingLibraryMatchers<void, T> {}
7
+ interface AsymmetricMatchersContaining extends TestingLibraryMatchers<void, void> {}
8
+
9
+ type Promisify<O> = {
10
+ [K in keyof O]: O[K] extends (...args: infer A) => infer R
11
+ ? O extends R
12
+ ? Promisify<O[K]>
13
+ : (...args: A) => Promise<R>
14
+ : O[K];
15
+ }
16
+
17
+ type PromisifyDomAssertion<T> = Promisify<Assertion<T>>
18
+
19
+ interface ExpectStatic {
20
+ /**
21
+ * `expect.element(locator)` is a shorthand for `expect.poll(() => locator.element())`.
22
+ * You can set default timeout via `expect.poll.timeout` option in the config.
23
+ * @see {@link https://vitest.dev/api/expect#poll}
24
+ */
25
+ element: <T extends HTMLElement | SVGElement | null | Locator>(element: T, options?: ExpectPollOptions) => PromisifyDomAssertion<Awaited<HTMLElement | SVGElement | null>>
26
+ }
27
+ }
28
+
29
+ export {}
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/matchers';
1
+ export * from '@vitest/browser/matchers';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/node';
2
- export * from '@voidzero-dev/vite-plus-test/node';
1
+ import 'vitest/node';
2
+ export * from 'vitest/node';
package/dist/test/node.js CHANGED
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/node';
1
+ export * from 'vitest/node';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/optional-runtime-types.js';
2
- export * from '@voidzero-dev/vite-plus-test/optional-runtime-types.js';
1
+ import 'vitest/optional-runtime-types.js';
2
+ export * from 'vitest/optional-runtime-types.js';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/optional-types.js';
2
- export * from '@voidzero-dev/vite-plus-test/optional-types.js';
1
+ import 'vitest/optional-types.js';
2
+ export * from 'vitest/optional-types.js';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-client';
1
+ export * from '@vitest/browser/client';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-context';
1
+ export * from '@vitest/browser/context';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-locators';
1
+ export * from '@vitest/browser/locators';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-playwright';
1
+ export * from '@vitest/browser-playwright';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-preview';
1
+ export * from '@vitest/browser-preview';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser-webdriverio';
1
+ export * from '@vitest/browser-webdriverio';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/browser';
1
+ export * from '@vitest/browser';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/expect';
1
+ export * from '@vitest/expect';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-automock';
1
+ export * from '@vitest/mocker/automock';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-browser';
1
+ export * from '@vitest/mocker/browser';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-node';
1
+ export * from '@vitest/mocker/node';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-redirect';
1
+ export * from '@vitest/mocker/redirect';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-register';
1
+ export * from '@vitest/mocker/register';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker-transforms';
1
+ export * from '@vitest/mocker/transforms';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/mocker';
1
+ export * from '@vitest/mocker';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/pretty-format';
1
+ export * from '@vitest/pretty-format';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/runner-types';
1
+ export * from '@vitest/runner/types';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/runner-utils';
1
+ export * from '@vitest/runner/utils';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/runner';
1
+ export * from '@vitest/runner';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/snapshot-environment';
1
+ export * from '@vitest/snapshot/environment';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/snapshot-manager';
1
+ export * from '@vitest/snapshot/manager';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/snapshot';
1
+ export * from '@vitest/snapshot';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/spy';
1
+ export * from '@vitest/spy';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-constants';
1
+ export * from '@vitest/utils/constants';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-diff';
1
+ export * from '@vitest/utils/diff';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-display';
1
+ export * from '@vitest/utils/display';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-error';
1
+ export * from '@vitest/utils/error';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-helpers';
1
+ export * from '@vitest/utils/helpers';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-offset';
1
+ export * from '@vitest/utils/offset';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-resolver';
1
+ export * from '@vitest/utils/resolver';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-serialize';
1
+ export * from '@vitest/utils/serialize';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-source-map-node';
1
+ export * from '@vitest/utils/source-map/node';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-source-map';
1
+ export * from '@vitest/utils/source-map';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils-timers';
1
+ export * from '@vitest/utils/timers';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/plugins/utils';
1
+ export * from '@vitest/utils';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/reporters';
2
- export * from '@voidzero-dev/vite-plus-test/reporters';
1
+ import 'vitest/reporters';
2
+ export * from 'vitest/reporters';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/reporters';
1
+ export * from 'vitest/reporters';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/runners';
2
- export * from '@voidzero-dev/vite-plus-test/runners';
1
+ import 'vitest/runners';
2
+ export * from 'vitest/runners';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/runners';
1
+ export * from 'vitest/runners';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/runtime';
2
- export * from '@voidzero-dev/vite-plus-test/runtime';
1
+ import 'vitest/runtime';
2
+ export * from 'vitest/runtime';
@@ -1 +1 @@
1
- export * from '@voidzero-dev/vite-plus-test/runtime';
1
+ export * from 'vitest/runtime';
@@ -1,2 +1,2 @@
1
- import '@voidzero-dev/vite-plus-test/snapshot';
2
- export * from '@voidzero-dev/vite-plus-test/snapshot';
1
+ import 'vitest/snapshot';
2
+ export * from 'vitest/snapshot';