@stencil/vitest 1.1.10 → 1.1.12

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/README.md CHANGED
@@ -101,7 +101,7 @@ describe('my-button', () => {
101
101
  const { root, waitForChanges } = await render(<my-button label="Click me" />);
102
102
  root.click();
103
103
  await waitForChanges();
104
- expect(root).toEqualHtml(`
104
+ await expect(root).toEqualHtml(`
105
105
  <my-button class="hydrated">
106
106
  <mock:shadow-root>
107
107
  <button class="button button--secondary button--small" type="button">
@@ -171,8 +171,8 @@ expect(element).toEqualText('Exact text match');
171
171
 
172
172
  // Shadow DOM
173
173
  expect(element).toHaveShadowRoot();
174
- expect(element).toEqualHtml('<div>Expected HTML</div>');
175
- expect(element).toEqualLightHtml('<div>Light DOM only</div>');
174
+ await expect(element).toEqualHtml('<div>Expected HTML</div>');
175
+ await expect(element).toEqualLightHtml('<div>Light DOM only</div>');
176
176
  ```
177
177
 
178
178
  ### Event Testing
@@ -1 +1 @@
1
- {"version":3,"file":"stencil.d.ts","sourceRoot":"","sources":["../../src/environments/stencil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvD,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,cAAc,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;CACrD;AAQD;;;;;;;;;;;;;;;;GAgBG;wBACa,WAAW;AAA3B,wBAqDE"}
1
+ {"version":3,"file":"stencil.d.ts","sourceRoot":"","sources":["../../src/environments/stencil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvD,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,cAAc,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;CACrD;AAQD;;;;;;;;;;;;;;;;GAgBG;wBACa,WAAW;AAA3B,wBA4DE"}
@@ -56,6 +56,12 @@ export default {
56
56
  const { keys, originals } = populateGlobal(global, win, {
57
57
  bindFunctions: true,
58
58
  });
59
+ // Remove undefined properties that shadow native globals
60
+ keys.forEach((key) => {
61
+ if (global[key] === undefined && originals.has(key)) {
62
+ global[key] = originals.get(key);
63
+ }
64
+ });
59
65
  return {
60
66
  teardown(global) {
61
67
  // Teardown the environment first (e.g., window.close())
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.10",
7
+ "version": "1.1.12",
8
8
  "description": "First-class testing utilities for Stencil design systems with Vitest",
9
9
  "license": "MIT",
10
10
  "type": "module",
@@ -62,8 +62,8 @@
62
62
  "access": "public"
63
63
  },
64
64
  "peerDependencies": {
65
- "@stencil/core": "^4.0.0",
66
- "vitest": "^4.0.0 || ^3.0.0 || ^2.0.0 || ^5.0.0-next || ^5.0.0"
65
+ "@stencil/core": "^4.0.0 || ^5.0.0-next || ^5.0.0",
66
+ "vitest": "^4.0.0 || ^3.0.0 || ^2.0.0"
67
67
  },
68
68
  "peerDependenciesMeta": {
69
69
  "@playwright/test": {
@@ -72,6 +72,9 @@
72
72
  "@wdio/globals": {
73
73
  "optional": true
74
74
  },
75
+ "@stencil/mock-doc": {
76
+ "optional": true
77
+ },
75
78
  "jsdom": {
76
79
  "optional": true
77
80
  },
@@ -94,7 +97,7 @@
94
97
  "dependencies": {
95
98
  "jiti": "^2.6.1",
96
99
  "local-pkg": "^1.1.2",
97
- "vitest-environment-stencil": "1.1.10"
100
+ "vitest-environment-stencil": "1.1.12"
98
101
  },
99
102
  "devDependencies": {
100
103
  "@eslint/js": "^9.39.2",