-
Notifications
You must be signed in to change notification settings - Fork 29
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
refactor(i18n): convert to TS #774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
return <div>{'Nothing'}</div>; | ||
}; | ||
|
||
const createTestProps = (props: Partial<Props> = {}) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏿
@@ -110,6 +110,7 @@ | |||
"prettier": "1.18.2", | |||
"puppeteer": "1.17.0", | |||
"rcfile": "1.0.3", | |||
"react-testing-library": "7.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I moved the rtl dep to the root package. Only a couple of packages (e.g. app-shell, jest preset) define it explicitly as a peer dependency.
@@ -0,0 +1,115 @@ | |||
import { mocked } from 'ts-jest/utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this here: kulshekhar/ts-jest#576 (comment)
It's basically to have the mocked modules jest.mock
properly typed.
import { mocked } from 'ts-jest/utils'; | ||
import React from 'react'; | ||
import { reportErrorToSentry } from '@commercetools-frontend/sentry'; | ||
import { render, wait } from 'react-testing-library'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also rewrote the tests using rtl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one
No description provided.