Skip to content

Conversation

@cunhabruno
Copy link

@cunhabruno cunhabruno commented Nov 21, 2025

Description

Add configuration option to allow users to control whether Detox should throw or log warnings when receiving unexpected WebSocket messages. This is useful for applications with complex view hierarchies (e.g., React Native apps with WebViews) where legitimate messages might be received in unexpected contexts.


For features/enhancements:

  • I have added/updated the relevant references in the documentation files.

For API changes:

  • I have made the necessary changes in the types index file.

this._closing = null;
this._abortedMessageIds = new Set();
this._ignoreUnexpectedMessages = options.ignoreUnexpectedMessages ??
(process.env.DETOX_IGNORE_UNEXPECTED_WS_MESSAGES === 'true');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have collectCliConfig for this, we don't use process.env directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants