@stencil/vitest 1.1.8 → 1.1.10

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 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/testing/render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,aAAa,CAAC;AAE1D,UAAU,aAAa;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAKD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,CAAC,GAAG,GAAG,EACvE,KAAK,EAAE,GAAG,EACV,OAAO,GAAE,aAGR,GACA,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CA8H7B"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/testing/render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,aAAa,CAAC;AAE1D,UAAU,aAAa;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAKD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,CAAC,GAAG,GAAG,EACvE,KAAK,EAAE,GAAG,EACV,OAAO,GAAE,aAGR,GACA,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAkI7B"}
@@ -75,9 +75,13 @@ export async function render(vnode, options = {
75
75
  container.remove();
76
76
  };
77
77
  const spyOnEvent = (eventName) => {
78
- // Return existing spy if already created
79
- if (eventSpies.has(container)) {
80
- return eventSpies.get(container).find((spy) => spy.eventName === eventName);
78
+ // Return existing spy if already created for this specific event
79
+ const existingSpies = eventSpies.get(container);
80
+ if (existingSpies) {
81
+ const existingSpy = existingSpies.find((spy) => spy.eventName === eventName);
82
+ if (existingSpy) {
83
+ return existingSpy;
84
+ }
81
85
  }
82
86
  const spy = {
83
87
  eventName,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/stenciljs/vitest"
6
6
  },
7
- "version": "1.1.8",
7
+ "version": "1.1.10",
8
8
  "description": "First-class testing utilities for Stencil design systems with Vitest",
9
9
  "license": "MIT",
10
10
  "type": "module",
@@ -51,8 +51,10 @@
51
51
  ],
52
52
  "keywords": [
53
53
  "stencil",
54
+ "stenciljs",
54
55
  "testing",
55
56
  "vitest",
57
+ "custom elements",
56
58
  "web components",
57
59
  "component testing"
58
60
  ],
@@ -61,7 +63,7 @@
61
63
  },
62
64
  "peerDependencies": {
63
65
  "@stencil/core": "^4.0.0",
64
- "vitest": "^4.0.0 || ^3.0.0 || ^2.0.0"
66
+ "vitest": "^4.0.0 || ^3.0.0 || ^2.0.0 || ^5.0.0-next || ^5.0.0"
65
67
  },
66
68
  "peerDependenciesMeta": {
67
69
  "@playwright/test": {
@@ -92,7 +94,7 @@
92
94
  "dependencies": {
93
95
  "jiti": "^2.6.1",
94
96
  "local-pkg": "^1.1.2",
95
- "vitest-environment-stencil": "1.1.8"
97
+ "vitest-environment-stencil": "1.1.10"
96
98
  },
97
99
  "devDependencies": {
98
100
  "@eslint/js": "^9.39.2",