Skip to content

Commit 42466d4

Browse files
committed
.
1 parent ed48cfe commit 42466d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/helpers/__tests__/accessiblity.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Pressable, Switch, Text, TextInput, TouchableOpacity, View } from 'react-native';
2+
import { Image, Pressable, Switch, Text, TextInput, TouchableOpacity, View } from 'react-native';
33

44
import { isHiddenFromAccessibility, isInaccessible, render, screen } from '../..';
55
import {
@@ -492,6 +492,7 @@ describe('computeAccessibleName', () => {
492492
<Text>Text Content</Text>
493493
</View>
494494
<TextInput testID="text-input" placeholder="Text Input" />
495+
<Image testID="image" alt="Image Alt" src="https://example.com/image.jpg" />
495496
</>,
496497
);
497498
expect(computeAccessibleName(screen.getByTestId('aria-label'))).toBe('ARIA Label');
@@ -500,6 +501,7 @@ describe('computeAccessibleName', () => {
500501
);
501502
expect(computeAccessibleName(screen.getByTestId('text-content'))).toBe('Text Content');
502503
expect(computeAccessibleName(screen.getByTestId('text-input'))).toBe('Text Input');
504+
expect(computeAccessibleName(screen.getByTestId('image'))).toBe('Image Alt');
503505
});
504506

505507
test('basic precedence', async () => {

0 commit comments

Comments
 (0)