Skip to content

fix: False positive warning about MessageChannel #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 4, 2019

What:
Closes #521

Why:

Warning was a false positive

How:

Correctly translate

warningWithoutStack(
          typeof MessageChannel !== 'undefined',
          'This browser does not have a MessageChannel implementation, ' +
            'so enqueuing tasks via await act(async () => ...) will fail. ' +
            'Please file an issue at https://github.com/facebook/react/issues ' +
            'if you encounter this warning.',
        );

warningWithoutStack (like warning) works different than console.error and is very confusing (which is also why react is getting rid of it)

Checklist:
check an item, place an "x" in the box like so: "- [x] Documentation" -->

@eps1lon eps1lon added the bug Something isn't working label Nov 4, 2019
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thank you!

@kentcdodds kentcdodds merged commit 11460a3 into testing-library:master Nov 4, 2019
@eps1lon eps1lon deleted the fix/message-channel-warning branch November 4, 2019 15:01
@kentcdodds
Copy link
Member

🎉 This PR is included in version 9.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9.3.1 requires MessageChannel implementation
2 participants