Skip to content

Commit 4853b61

Browse files
Update setupTests.jsx
1 parent d204f22 commit 4853b61

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

admin-js/tests/setupTests.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
const http = require("http");
22
const {spawn} = require("child_process");
33
import "whatwg-fetch"; // https://github.com/jsdom/jsdom/issues/1724
4-
import "@testing-library/jest-dom";
5-
import failOnConsole from "jest-fail-on-console";
4+
//import failOnConsole from "jest-fail-on-console";
65
import {memoryStore} from "react-admin";
76
import {configure, render, screen} from "@testing-library/react";
87
import * as structuredClone from "@ungap/structured-clone";
@@ -12,15 +11,15 @@ const {App} = require("../src/App");
1211
let pythonProcess;
1312
let STATE;
1413

15-
jest.setTimeout(300000); // 5 mins
14+
/*jest.setTimeout(300000); // 5 mins
1615
configure({"asyncUtilTimeout": 10000});
1716
jest.mock("react-admin", () => {
1817
const originalModule = jest.requireActual("react-admin");
1918
return {
2019
...originalModule,
2120
downloadCSV: jest.fn(), // Mock downloadCSV to test export button.
2221
};
23-
});
22+
});*/
2423

2524
// https://github.com/jsdom/jsdom/issues/3363#issuecomment-1387439541
2625
global.structuredClone = structuredClone.default;
@@ -33,12 +32,12 @@ window.matchMedia = (query) => ({
3332
});
3433

3534
// Ignore not implemented errors
36-
window.scrollTo = jest.fn();
35+
//window.scrollTo = jest.fn();
3736

3837

3938
global.sleep = (delay_s) => new Promise((resolve) => setTimeout(resolve, delay_s * 1000));
4039

41-
failOnConsole({
40+
/*failOnConsole({
4241
silenceMessage: (msg) => {
4342
return (
4443
// Suppress act() warnings, because there's too many async changes happening.
@@ -49,7 +48,7 @@ failOnConsole({
4948
|| msg.includes("The above error occurred in the <EditBase> component")
5049
);
5150
}
52-
});
51+
});*/
5352

5453
beforeAll(async() => {
5554
if (!global.pythonProcessPath)

0 commit comments

Comments
 (0)