-
Notifications
You must be signed in to change notification settings - Fork 77
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
ix-select testing with JEST #1448
Comments
Test not running at all in example
Please prepare a Github repo which shows the issue. |
@danielleroux please check the following stackblitz code Github repo: https://github.com/umeWaheed/ix-select-testing |
Please setup your unit-tests correctly you have to mock the call or handle the async behaviour of your fetch request: <button
data-testid="add-btn"
onClick={() => {
setExistingPlatformsList([
{
name: 'Test1 ',
},
{
name: 'Test2 ',
},
{
name: 'Test3 ',
},
]);
}}
>
Fetch more ...
</button> expect(newLen).toBe(4); I close this issue regarding the wrong test behaviour not an actual issue. Feel free to open or a create a new issue if you still found an issue in the library. |
I've been able to resolve this issue by using |
Prerequisites
What happened?
I'm writing test cases for a react application. The following behaviour is expected:
Issue:
On writing test case for this scenario:
What type of frontend framework are you seeing the problem on?
React
Which version of iX do you use?
v2.0.0
Other dependencies:
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
Code to produce this issue.
The text was updated successfully, but these errors were encountered: