We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
code :
`import { Dropdown } from 'react-native-element-dropdown'; ... ... ..
`
test
import { render, screen } from '@testing-library/react-native'; import React from 'react'; import MockProviders from '../../../__Mocks__/MockProviders'; import Dropdown from '.'; const testId = 'label'; describe('Testing Label component', () => { it('Testing Label', () => { render( <MockProviders brand="valtra"> <Dropdown testID={testId} options={{ value: '1', label: 'India', imageUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Flag_of_India.png/1024px-Flag_of_India.png', }} value="2" onChange={jest.fn()} label="Label" placeholder="Select Country" searchPlaceholder="Search" errorMessage="Mandatory Field" /> </MockProviders>, ); const foundLabel = screen.getByTestId(testId); expect(foundLabel).toBeTruthy(); }); });
Error:
The text was updated successfully, but these errors were encountered:
hi @akunal1 , I'm working on it.
Sorry, something went wrong.
jest.mock('react-native-element-dropdown', () => jest.fn());
can you try adding the above line above describe statement ? @akunal1
as a temporary solution
"moduleNameMapper": { "\\.(jpg|jpeg|png|gif|svg)$": "<rootDir>/__mocks__/fileMock.js" }
// __mocks__/fileMock.js module.exports = 'test-file-stub';
No branches or pull requests
code :
`import { Dropdown } from 'react-native-element-dropdown';
...
...
..
`
test
Error:
The text was updated successfully, but these errors were encountered: