vitest-browser-vue 0.2.0 → 1.1.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.
- package/dist/{chunk-ELIMMUCX.js → chunk-UVTFRJ6S.js} +2 -0
- package/dist/index.js +1 -1
- package/dist/pure.d.ts +1 -0
- package/dist/pure.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/pure.ts
|
|
2
|
+
import { page } from "@vitest/browser/context";
|
|
2
3
|
import { mount } from "@vue/test-utils";
|
|
3
4
|
import { debug, getElementLocatorSelectors } from "@vitest/browser/utils";
|
|
4
5
|
import { config } from "@vue/test-utils";
|
|
@@ -23,6 +24,7 @@ function render(Component, {
|
|
|
23
24
|
return {
|
|
24
25
|
container,
|
|
25
26
|
baseElement,
|
|
27
|
+
locator: page.elementLocator(container),
|
|
26
28
|
debug: (el = baseElement, maxLength, options) => debug(el, maxLength, options),
|
|
27
29
|
unmount: () => wrapper.unmount(),
|
|
28
30
|
emitted: (name) => wrapper.emitted(name),
|
package/dist/index.js
CHANGED
package/dist/pure.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type ComponentProps<T> = T extends new (...angs: any) => {
|
|
|
10
10
|
interface RenderResult<Props> extends LocatorSelectors {
|
|
11
11
|
container: HTMLElement;
|
|
12
12
|
baseElement: HTMLElement;
|
|
13
|
+
locator: Locator;
|
|
13
14
|
debug(el?: HTMLElement | HTMLElement[] | Locator | Locator[], maxLength?: number, options?: PrettyDOMOptions): void;
|
|
14
15
|
unmount(): void;
|
|
15
16
|
emitted<T = unknown>(): Record<string, T[]>;
|
package/dist/pure.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-browser-vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "Render Vue components in Vitest Browser Mode",
|
|
6
6
|
"author": "Vitest Team",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"node": "^18.0.0 || >=20.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@vitest/browser": "^2.1.0 || ^3.0.0-0",
|
|
46
|
-
"vitest": "^2.1.0 || ^3.0.0-0",
|
|
45
|
+
"@vitest/browser": "^2.1.0 || ^3.0.0 || ^4.0.0-0",
|
|
46
|
+
"vitest": "^2.1.0 || ^3.0.0 || ^4.0.0-0",
|
|
47
47
|
"vue": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|