mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add announceForAccessibilityWithOptions method mock. (#47063)
Summary: Currently, tests on components that use the `AccessibilityInfo.announceForAccessibilityWithOptions` method fail because a mock for this method is not present in the `jest` setup file. This PR adds the mock for the before mentioned method in the appropriate `setup.js` file ## Changelog: [General][Added] - Added the missing `announceForAccessibilityWithOptions` function mock in the `packages/react-native/jest/setup.js` file. Pull Request resolved: https://github.com/facebook/react-native/pull/47063 Test Plan: Here are the commands I executed after making the modification: - `yarn prettier` - `yarn lint` - `yarn test` ### Test output  Reviewed By: tdn120 Differential Revision: D64495941 Pulled By: lunaleaps fbshipit-source-id: 6ab835e2934b87ec3ac64cf0aebd8dcb58cd0da1
This commit is contained in:
1 parent
52ea8b07e2
commit
4ae999b90b
1 file changed
+1
Vendored
+1
@@ -146,6 +146,7 @@ jest
|
||||
remove: jest.fn(),
|
||||
})),
|
||||
announceForAccessibility: jest.fn(),
|
||||
announceForAccessibilityWithOptions: jest.fn(),
|
||||
isAccessibilityServiceEnabled: jest.fn(() => Promise.resolve(false)),
|
||||
isBoldTextEnabled: jest.fn(() => Promise.resolve(false)),
|
||||
isGrayscaleEnabled: jest.fn(() => Promise.resolve(false)),
|
||||
|
||||
Reference in new issue
Block a user