@trackunit/react-vite-test-setup 0.0.200 → 0.0.205-alpha-563d99d17d6.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.
package/index.cjs.js CHANGED
@@ -1408,24 +1408,6 @@ const setupDefaultMocks = (options = {}) => {
1408
1408
  setupTranslations();
1409
1409
  };
1410
1410
 
1411
- /**
1412
- * Sets up the browser APIs that the Lexical editor needs and JSDOM leaves out.
1413
- *
1414
- * Without `InputEvent.getTargetRanges`, Lexical ignores the `beforeinput` events that user-event sends,
1415
- * so typing does nothing. Without `Range.getBoundingClientRect`, it fails when it scrolls to the caret
1416
- * or places a typeahead menu.
1417
- *
1418
- * @example
1419
- * // In your vitest setup file
1420
- * import { setupLexical } from '@trackunit/react-vite-test-setup';
1421
- *
1422
- * setupLexical();
1423
- */
1424
- const setupLexical = () => {
1425
- Object.defineProperty(InputEvent.prototype, "getTargetRanges", { configurable: true, value: () => [] });
1426
- Object.defineProperty(Range.prototype, "getBoundingClientRect", { configurable: true, value: () => new DOMRect() });
1427
- };
1428
-
1429
1411
  /**
1430
1412
  * Mocks the `@tanstack/react-router` library for testing environments.
1431
1413
  *
@@ -1466,7 +1448,6 @@ exports.setupFailOnConsole = setupFailOnConsole;
1466
1448
  exports.setupGoogleMaps = setupGoogleMaps;
1467
1449
  exports.setupHelmetMock = setupHelmetMock;
1468
1450
  exports.setupIntersectionObserver = setupIntersectionObserver;
1469
- exports.setupLexical = setupLexical;
1470
1451
  exports.setupMapbox = setupMapbox;
1471
1452
  exports.setupMatchMediaMock = setupMatchMediaMock;
1472
1453
  exports.setupReactTestingLibrary = setupReactTestingLibrary;
package/index.esm.js CHANGED
@@ -1387,24 +1387,6 @@ const setupDefaultMocks = (options = {}) => {
1387
1387
  setupTranslations();
1388
1388
  };
1389
1389
 
1390
- /**
1391
- * Sets up the browser APIs that the Lexical editor needs and JSDOM leaves out.
1392
- *
1393
- * Without `InputEvent.getTargetRanges`, Lexical ignores the `beforeinput` events that user-event sends,
1394
- * so typing does nothing. Without `Range.getBoundingClientRect`, it fails when it scrolls to the caret
1395
- * or places a typeahead menu.
1396
- *
1397
- * @example
1398
- * // In your vitest setup file
1399
- * import { setupLexical } from '@trackunit/react-vite-test-setup';
1400
- *
1401
- * setupLexical();
1402
- */
1403
- const setupLexical = () => {
1404
- Object.defineProperty(InputEvent.prototype, "getTargetRanges", { configurable: true, value: () => [] });
1405
- Object.defineProperty(Range.prototype, "getBoundingClientRect", { configurable: true, value: () => new DOMRect() });
1406
- };
1407
-
1408
1390
  /**
1409
1391
  * Mocks the `@tanstack/react-router` library for testing environments.
1410
1392
  *
@@ -1431,4 +1413,4 @@ const setupTanstackReactRouter = () => {
1431
1413
  }));
1432
1414
  };
1433
1415
 
1434
- export { configureReliableAsyncUtils, createMockClickEvent, createMockMapboxMap, resetTanstackReactVirtualMock, setTanstackReactVirtualItems, setTanstackReactVirtualStableInstance, setupAllMocks, setupBasicMocks, setupCanvasMock, setupDefaultMocks, setupFailOnConsole, setupGoogleMaps, setupHelmetMock, setupIntersectionObserver, setupLexical, setupMapbox, setupMatchMediaMock, setupReactTestingLibrary, setupReactVirtualizedAutoSizer, setupResizeObserver, setupTanstackReactRouter, setupTanstackReactVirtual, setupTimeAndLanguage, setupTimeZone, setupTranslations, setupWebStreams, tanstackReactVirtualMock };
1416
+ export { configureReliableAsyncUtils, createMockClickEvent, createMockMapboxMap, resetTanstackReactVirtualMock, setTanstackReactVirtualItems, setTanstackReactVirtualStableInstance, setupAllMocks, setupBasicMocks, setupCanvasMock, setupDefaultMocks, setupFailOnConsole, setupGoogleMaps, setupHelmetMock, setupIntersectionObserver, setupMapbox, setupMatchMediaMock, setupReactTestingLibrary, setupReactVirtualizedAutoSizer, setupResizeObserver, setupTanstackReactRouter, setupTanstackReactVirtual, setupTimeAndLanguage, setupTimeZone, setupTranslations, setupWebStreams, tanstackReactVirtualMock };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trackunit/react-vite-test-setup",
3
3
  "description": "Test setup utilities for React applications",
4
- "version": "0.0.200",
4
+ "version": "0.0.205-alpha-563d99d17d6.0",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
7
7
  "engines": {
package/src/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export * from "./setupFailOnConsole";
7
7
  export * from "./setupGoogleMaps";
8
8
  export * from "./setupHelmetMock";
9
9
  export * from "./setupIntersectionObserver";
10
- export * from "./setupLexical";
11
10
  export * from "./setupMapbox";
12
11
  export * from "./setupMatchMediaMock";
13
12
  export * from "./setupReactTestingLibrary";
@@ -1,14 +0,0 @@
1
- /**
2
- * Sets up the browser APIs that the Lexical editor needs and JSDOM leaves out.
3
- *
4
- * Without `InputEvent.getTargetRanges`, Lexical ignores the `beforeinput` events that user-event sends,
5
- * so typing does nothing. Without `Range.getBoundingClientRect`, it fails when it scrolls to the caret
6
- * or places a typeahead menu.
7
- *
8
- * @example
9
- * // In your vitest setup file
10
- * import { setupLexical } from '@trackunit/react-vite-test-setup';
11
- *
12
- * setupLexical();
13
- */
14
- export declare const setupLexical: () => void;