Skip to content

Set testID and/or accessibilityLabel #8

@tuzz

Description

@tuzz

Hello, a common pattern is to test components via their testID or accessibilityLabel attributes. Would it be possible to forward any other props like this to the Image component?

Example Jest test:

it("sets the source image correctly", () => {
  const view = render(<MyComponent />);
  const image = view.getByTestId("some_image");

  expect(image.props.source.uri).toBe("https://some/image.png");
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions