@stencil/mock-doc 5.0.0-beta.10 → 5.0.0-beta.11

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.
Files changed (2) hide show
  1. package/dist/index.mjs +8 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5286,11 +5286,14 @@ function resetWindow(win) {
5286
5286
  if (win.document != null) try {
5287
5287
  win.document.defaultView = win;
5288
5288
  } catch {}
5289
- win.fetch = null;
5290
- win.Headers = null;
5291
- win.Request = null;
5292
- win.Response = null;
5293
- win.FetchError = null;
5289
+ const windowDestroyed = () => {
5290
+ throw new Error("MockWindow was already destroyed");
5291
+ };
5292
+ win.fetch = windowDestroyed;
5293
+ win.Headers = windowDestroyed;
5294
+ win.Request = windowDestroyed;
5295
+ win.Response = windowDestroyed;
5296
+ win.FetchError = windowDestroyed;
5294
5297
  }
5295
5298
  }
5296
5299
  function resetWindowDimensions(win) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/mock-doc",
3
- "version": "5.0.0-beta.10",
3
+ "version": "5.0.0-beta.11",
4
4
  "description": "A minimal mock DOM implementation for SSR and testing",
5
5
  "keywords": [
6
6
  "dom",