vitest-browser-vue 1.0.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.
@@ -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
@@ -2,7 +2,7 @@ import {
2
2
  cleanup,
3
3
  config,
4
4
  render
5
- } from "./chunk-ELIMMUCX.js";
5
+ } from "./chunk-UVTFRJ6S.js";
6
6
 
7
7
  // src/index.ts
8
8
  import { page } from "@vitest/browser/context";
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
@@ -2,7 +2,7 @@ import {
2
2
  cleanup,
3
3
  config,
4
4
  render
5
- } from "./chunk-ELIMMUCX.js";
5
+ } from "./chunk-UVTFRJ6S.js";
6
6
  export {
7
7
  cleanup,
8
8
  config,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest-browser-vue",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "description": "Render Vue components in Vitest Browser Mode",
6
6
  "author": "Vitest Team",
7
7
  "license": "MIT",