Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@types/eslint": "^9.6.1",
"@types/jest": "^30.0.0",
"@types/jest-axe": "^3.5.9",
"@types/node": "22.15.30",
"@types/node": "24.6.0",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@typescript-eslint/eslint-plugin": "^8.22.0",
Expand Down
22 changes: 13 additions & 9 deletions src/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ expect.extend(toHaveNoViolations);
const originalError = console.error;
beforeAll(() => {
console.error = (...args) => {
// Check if any of the arguments contains the floating-ui act warning
const hasFloatingActWarning = args.some(
(arg) =>
typeof arg === "string" &&
arg.includes(
"An update to withFloating(PopperComponent) inside a test was not wrapped in act",
),
);
// Check the first argument (the error message)
const firstArg = args[0];
const firstArgStr =
typeof firstArg === "string"
? firstArg
: firstArg instanceof Error
? firstArg.message
: String(firstArg);

if (hasFloatingActWarning) {
// Suppress floating-ui act warnings
if (
firstArgStr.includes("An update to withFloating(PopperComponent)") &&
firstArgStr.includes("inside a test was not wrapped in act")
) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"noUncheckedIndexedAccess": true,
"module": "esnext",
"target": "ES2015",
"lib": ["ES2021", "dom"],
"lib": ["ES2022", "dom"],
"sourceMap": true,
"jsx": "react",
"moduleResolution": "node",
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3442,12 +3442,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:22.15.30":
version: 22.15.30
resolution: "@types/node@npm:22.15.30"
"@types/node@npm:24.6.0":
version: 24.6.0
resolution: "@types/node@npm:24.6.0"
dependencies:
undici-types: "npm:~6.21.0"
checksum: 10c0/ca330ac0e7fd502686d6df115fcc606aba46fd334220f749bbba2f639accdadcb23f7900603ceccdc8240be736739cad5c0b87c0fa92c9255a4dff245f07d664
undici-types: "npm:~7.13.0"
checksum: 10c0/06f1aa1b5d9a8c26285b34c25aee554f31a1dc0b39627cc14e7c1c6967e75a47ab9f409eee14796cbcc004ae4059fa884cb6092ecfb368c9656d16686d7cc9d8
languageName: node
linkType: hard

Expand Down Expand Up @@ -9480,7 +9480,7 @@ __metadata:
"@types/eslint": "npm:^9.6.1"
"@types/jest": "npm:^30.0.0"
"@types/jest-axe": "npm:^3.5.9"
"@types/node": "npm:22.15.30"
"@types/node": "npm:24.6.0"
"@types/react": "npm:^19.1.10"
"@types/react-dom": "npm:^19.1.7"
"@typescript-eslint/eslint-plugin": "npm:^8.22.0"
Expand Down Expand Up @@ -11160,10 +11160,10 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.21.0":
version: 6.21.0
resolution: "undici-types@npm:6.21.0"
checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04
"undici-types@npm:~7.13.0":
version: 7.13.0
resolution: "undici-types@npm:7.13.0"
checksum: 10c0/44bbb0935425291351bfd8039571f017295b5d6dc5727045d0a4fea8c6ffe73a6703b48ce010f9cb539b9041a75b463f8cfe1e7309cab7486452505fb0d66151
languageName: node
linkType: hard

Expand Down
Loading