Skip to content
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

feat: Implement jest mocks for react-native. #535

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

professorice
Copy link

@professorice professorice commented Aug 6, 2024

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

@professorice professorice requested a review from a team as a code owner August 6, 2024 19:36
@kinyoklion kinyoklion changed the title Mzafir/react native jest mock feat: Implement jest mocks for react-native. Aug 6, 2024
import { mockFlags, mockUseLDClient } from '@launchdarkly/jest/react-native';

export default function Welcome() {
const flagValue = mockFlags({ 'dev-test-flag': true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we probably want the example to appear like a normal react-native application using our SDK, then have tests that use a component from that application, but with a mock?

Similar to the example tests in the existing mocks project: https://github.com/launchdarkly/jest-launchdarkly-mock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants