@stencil/vitest 1.1.8 → 1.1.9
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,
|
|
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"}
|
package/dist/testing/render.js
CHANGED
|
@@ -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
|
-
|
|
80
|
-
|
|
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.
|
|
7
|
+
"version": "1.1.9",
|
|
8
8
|
"description": "First-class testing utilities for Stencil design systems with Vitest",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"jiti": "^2.6.1",
|
|
94
94
|
"local-pkg": "^1.1.2",
|
|
95
|
-
"vitest-environment-stencil": "1.1.
|
|
95
|
+
"vitest-environment-stencil": "1.1.9"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@eslint/js": "^9.39.2",
|