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

refactor(i18n): convert to TS #774

Merged
merged 1 commit into from Jun 22, 2019
Merged

refactor(i18n): convert to TS #774

merged 1 commit into from Jun 22, 2019

Conversation

emmenko
Copy link
Member

@emmenko emmenko commented Jun 19, 2019

No description provided.

Copy link
Contributor

@tdeekens tdeekens left a 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> = {}) => ({
Copy link
Contributor

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",
Copy link
Member Author

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';
Copy link
Member Author

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';
Copy link
Member Author

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

Copy link
Contributor

@montezume montezume left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@adnasa adnasa left a comment

Choose a reason for hiding this comment

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

nice one

@emmenko emmenko merged commit 82774d0 into master Jun 22, 2019
@emmenko emmenko deleted the nm-ts-i18n branch June 22, 2019 14:33
@emmenko emmenko mentioned this pull request Jul 26, 2019
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants