Skip to content

Commit 545cb0a

Browse files
committed
t/selenium.mjs: Filter React DevTools log spam
"Download the React DevTools for a better development experience" is logged to the console on each new page load, and there's no way to suppress it outside of production, but we can filter it out within the log inspector callback.
1 parent ce69c98 commit 545cb0a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/selenium.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,13 @@ async function runCommands(stest, commands, t) {
11491149

11501150
const inspector = await logInspector(driver);
11511151
await inspector.onConsoleEntry(function (log) {
1152+
if (
1153+
log.type === 'console' &&
1154+
log.level === 'info' &&
1155+
/React DevTools/.test(log.text)
1156+
) {
1157+
return;
1158+
}
11521159
t.comment(`[${log.type}] [${log.level}] ${log.text}`);
11531160
});
11541161

0 commit comments

Comments
 (0)