-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
test: Fix Rich Text failures #60290
test: Fix Rich Text failures #60290
Conversation
Prevent cryptic test failure messages originating from invoking this undefined method, which prevented the original error message from surfacing in the test failure log.
This export was added for interoperability with the web version modified in #58916.
Size Change: 0 B Total Size: 1.72 MB ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -81,6 +81,7 @@ jest.mock( '@wordpress/api-fetch', () => { | |||
jest.mock( '@wordpress/react-native-bridge', () => { | |||
return { | |||
addEventListener: jest.fn(), | |||
logException: jest.fn(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Since this function is only invoked when there's an error, we overlooked adding it because unit tests were passing. Thanks @dcalhoun for fixing it 🙇 !
What?
Address test failures and compatibility between web and native rich text
components.
Why?
Enable code sharing between platforms, namely the Quote block presently.
How?
Define missing
logException
native module mock that masked the actual testfailures.
Export a private API Rich Text module for interoperability with the web version,
which was modified in #58916.
Testing Instructions
Ensure no regressions occur when interacting with rich-text-powered blocks.
Verify the Quote block citation is toggled by a button in the block toolbar.
Testing Instructions for Keyboard
N/A, no user-facing changes.
Screenshots or screencast
N/A, no user-facing changes.