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

[typescript-migration] date_utils.js #4707

Merged
merged 11 commits into from
Apr 23, 2024
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
transformIgnorePatterns: ["/node_modules/(?!date-fns)"],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
"^.+\\.ts?$": "ts-jest",
// TODO: use it after the migration
// "^.+\\.ts?$": "ts-jest",
Comment on lines -14 to +15
Copy link
Member

Choose a reason for hiding this comment

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

Is this something we'll want to address after everything is completed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It'll check types inside test cases to be even more safe than now.

Because right now, for example, we have a few tests with incorrect prop-types but tests are still green
Знімок екрана 2024-04-22 о 22 03 24

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I even added it here #4700

Copy link
Member

Choose a reason for hiding this comment

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

perfect!

"node_modules/(?!date-fns/.*)": "ts-jest",
},
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
"precommit": "lint-staged --allow-empty",
"sass-lint": "stylelint 'src/stylesheets/*.scss'",
"lint": "yarn run eslint && yarn run sass-lint",
"prettier": "prettier --write '**/*.{js,jsx}'",
"prettier:check": "prettier --check '**/*.{js,jsx}'",
"prettier": "prettier --write '**/*.{js,jsx,ts,tsx}'",
"prettier:check": "prettier --check '**/*.{js,jsx,ts,tsx}'",
"start": "yarn --cwd docs-site install && yarn --cwd docs-site start",
"test": "NODE_ENV=test jest",
"test:ci": "NODE_ENV=test jest --ci --coverage",
Expand Down
Loading
Loading