@elliemae/ds-monorepo-devops 3.52.1 → 3.53.0-alpha.2
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.
|
@@ -15,7 +15,7 @@ const getFileFromCurrentFolder = (fileName) => path.normalize(path.resolve(__dir
|
|
|
15
15
|
* @returns {string[]} An array of setup files for Jest.
|
|
16
16
|
*/
|
|
17
17
|
const getSetupFilesAfterEnvBasedOnFlags = ({ silenceConsole = false }) => {
|
|
18
|
-
const setupFilesAfterEnv = [];
|
|
18
|
+
const setupFilesAfterEnv = [getFileFromCurrentFolder('virtualListFix.mjs')];
|
|
19
19
|
|
|
20
20
|
if (silenceConsole) {
|
|
21
21
|
setupFilesAfterEnv.push(getFileFromCurrentFolder('noConsoleMode.mjs'));
|
|
@@ -1 +1,17 @@
|
|
|
1
1
|
global.console = { jestLog: console.log, error: jest.fn(), warn: jest.fn(), log: jest.fn() };
|
|
2
|
+
jest.mock('@testing-library/react', () => {
|
|
3
|
+
const original = jest.requireActual('@testing-library/react');
|
|
4
|
+
const { prettyDOM } = jest.requireActual('@testing-library/dom');
|
|
5
|
+
return {
|
|
6
|
+
...original,
|
|
7
|
+
// 8/oct/2025
|
|
8
|
+
// copied and adapted for our needs from
|
|
9
|
+
// eslint-disable-next-line max-len
|
|
10
|
+
// https://github.com/testing-library/react-testing-library/blob/1c931a6c03091d725eccee7767d9ec696d5d33c6/src/pure.js#L190
|
|
11
|
+
debug: (el = original.baseElement, maxLength, options) => {
|
|
12
|
+
Array.isArray(el)
|
|
13
|
+
? el.forEach((e) => global.console.jestLog?.(prettyDOM(e, maxLength, options)))
|
|
14
|
+
: global.console.jestLog?.(prettyDOM(el, maxLength, options));
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
jest.mock('@tanstack/react-virtual', () => {
|
|
2
|
+
const original = jest.requireActual('@tanstack/react-virtual');
|
|
3
|
+
return {
|
|
4
|
+
...original,
|
|
5
|
+
useVirtualizer: jest.fn((virtualOpts) => {
|
|
6
|
+
const finalOpts = {
|
|
7
|
+
...virtualOpts,
|
|
8
|
+
overscan: 15,
|
|
9
|
+
initialRect: {
|
|
10
|
+
height: 500,
|
|
11
|
+
width: 400,
|
|
12
|
+
},
|
|
13
|
+
observeElementRect: (_, cb) => {
|
|
14
|
+
cb({ height: 500, width: 400 });
|
|
15
|
+
},
|
|
16
|
+
measureElement: () => 100,
|
|
17
|
+
};
|
|
18
|
+
return original.useVirtualizer(finalOpts);
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-monorepo-devops",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.53.0-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Monorepo Devops",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
46
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
47
47
|
"arg": "~5.0.2",
|
|
48
48
|
"glob": "~10.2.5",
|
|
49
49
|
"ignore": "^5.3.0",
|