@trackunit/react-test-setup 1.8.45 → 1.8.48-alpha-20eb17e1671.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 +2 -2
- package/index.esm.js +3 -3
- package/package.json +1 -1
- package/src/setupIntersectionObserver.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -204,6 +204,7 @@ class MockIntersectionObserver {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
this.root = null;
|
|
206
206
|
this.rootMargin = "";
|
|
207
|
+
this.scrollMargin = "";
|
|
207
208
|
this.thresholds = [];
|
|
208
209
|
}
|
|
209
210
|
disconnect() {
|
|
@@ -719,8 +720,7 @@ const setupTranslations = () => {
|
|
|
719
720
|
* setupWebStreams();
|
|
720
721
|
*/
|
|
721
722
|
const setupWebStreams = () => {
|
|
722
|
-
global.TransformStream
|
|
723
|
-
global.WritableStream = webStreamsPolyfill.WritableStream;
|
|
723
|
+
Object.assign(global, { TransformStream: webStreamsPolyfill.TransformStream, WritableStream: webStreamsPolyfill.WritableStream });
|
|
724
724
|
};
|
|
725
725
|
|
|
726
726
|
/**
|
package/index.esm.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Globals } from '@react-spring/web';
|
|
|
9
9
|
import { TextEncoder, TextDecoder } from 'util';
|
|
10
10
|
import { isValidElement, cloneElement } from 'react';
|
|
11
11
|
import * as reactI18next from 'react-i18next';
|
|
12
|
-
import {
|
|
12
|
+
import { WritableStream, TransformStream } from 'web-streams-polyfill';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Sets up a mock implementation for HTML Canvas API in testing environments.
|
|
@@ -183,6 +183,7 @@ class MockIntersectionObserver {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
this.root = null;
|
|
185
185
|
this.rootMargin = "";
|
|
186
|
+
this.scrollMargin = "";
|
|
186
187
|
this.thresholds = [];
|
|
187
188
|
}
|
|
188
189
|
disconnect() {
|
|
@@ -698,8 +699,7 @@ const setupTranslations = () => {
|
|
|
698
699
|
* setupWebStreams();
|
|
699
700
|
*/
|
|
700
701
|
const setupWebStreams = () => {
|
|
701
|
-
global
|
|
702
|
-
global.WritableStream = WritableStream;
|
|
702
|
+
Object.assign(global, { TransformStream, WritableStream });
|
|
703
703
|
};
|
|
704
704
|
|
|
705
705
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-test-setup",
|
|
3
3
|
"description": "Test setup utilities for React applications",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.48-alpha-20eb17e1671.0",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"engines": {
|
|
@@ -22,6 +22,7 @@ export declare const setupIntersectionObserver: () => typeof MockIntersectionObs
|
|
|
22
22
|
declare class MockIntersectionObserver {
|
|
23
23
|
readonly root: Element | null;
|
|
24
24
|
readonly rootMargin: string;
|
|
25
|
+
readonly scrollMargin: string;
|
|
25
26
|
readonly thresholds: ReadonlyArray<number>;
|
|
26
27
|
constructor();
|
|
27
28
|
disconnect(): void;
|