diff --git a/packages/react-native/Libraries/Components/__tests__/Button-test.js b/packages/react-native/Libraries/Components/__tests__/Button-test.js
index 8ecd5f7f6a6..f4386d93c5a 100644
--- a/packages/react-native/Libraries/Components/__tests__/Button-test.js
+++ b/packages/react-native/Libraries/Components/__tests__/Button-test.js
@@ -5,55 +5,55 @@
* LICENSE file in the root directory of this source tree.
*/
+import {create} from '../../../jest/renderer';
import Button from '../Button';
import * as React from 'react';
-import ReactTestRenderer from 'react-test-renderer';
describe('', () => {
- it('should render as expected', () => {
- expect(ReactTestRenderer.create()).toMatchSnapshot();
+ it('should render as expected', async () => {
+ expect(await create()).toMatchSnapshot();
});
- it('should be disabled and it should set accessibilityState to disabled when disabled={true}', () => {
+ it('should be disabled and it should set accessibilityState to disabled when disabled={true}', async() => {
expect(
- ReactTestRenderer.create()
+ await create()
).toMatchSnapshot();
});
- it('should be disabled when disabled={true} and accessibilityState={{disabled: true}}', () => {
+ it('should be disabled when disabled={true} and accessibilityState={{disabled: true}}', async() => {
expect(
- ReactTestRenderer.create()
+ await create()
).toMatchSnapshot();
});
- it('should be disabled when disabled is empty and accessibilityState={{disabled: true}}', () => {
+ it('should be disabled when disabled is empty and accessibilityState={{disabled: true}}',async () => {
expect(
- ReactTestRenderer.create()
+ await create()
).toMatchSnapshot();
});
- it('should overwrite accessibilityState with value of disabled prop', () => {
- expect(ReactTestRenderer.create()
+ it('should overwrite accessibilityState with value of disabled prop', async() => {
+ expect(await create()
).toMatchSnapshot();
});
- it('should not be disabled when disabled={false} and accessibilityState={{disabled: true}}', () => {
- expect(ReactTestRenderer.create()
+ it('should not be disabled when disabled={false} and accessibilityState={{disabled: true}}', async() => {
+ expect(await create()
).toMatchSnapshot();
});
- it('should not be disabled when disabled={false} and accessibilityState={{disabled: false}}', () => {
- expect(ReactTestRenderer.create( )
+ it('should not be disabled when disabled={false} and accessibilityState={{disabled: false}}', async() => {
+ expect(await create( )
).toMatchSnapshot();
});
- it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no-hide-descendants}', () => {
- expect(ReactTestRenderer.create( )
+ it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no-hide-descendants}', async() => {
+ expect(await create( )
).toMatchSnapshot();
});
- it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no}', () => {
- expect(ReactTestRenderer.create( )
+ it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no}', async() => {
+ expect( await create( )
).toMatchSnapshot();
});
});