Open codecakes opened 3 years ago
I would like to work on this, if it's still available
Go ahead and send a pr
Forgive my ignorance, but i can see project is already using create-react-app via react-scripts. which means it already has support for jest and coverage through jest. Also providing custom babel config via .babelrc or babel.config.js is not directly supported by create react app ( AFAIK )
Yes. I think React-testing-library is built using jest. So Jest should already be in the dependencies. You should be able to use both for testing.
Just raised a PR #108 , not sure if it's any useful. Since most of the stuff it out of the box. Another observation: There is no need of invoking tsc explicitly for compiling typescript code. react-scripts (CRA) takes care of transpiling
Just raised a PR #108 , not sure if it's any useful. Since most of the stuff it out of the box. Another observation: There is no need of invoking tsc explicitly for compiling typescript code. react-scripts (CRA) takes care of transpiling
file an issue regarding this. tsc transpiles jsdocs and needs babel 7 for that
@ksr89 can u look at the comments?
CRA comes with babel 7 support and we can't change the babel version without ejecting from CRA. There are tools like https://github.com/SoftwareBrothers/better-docs Which supports jsdoc generation for TS as well as JS files
@andyderek @Xrevolutions We don't need to use jsdoc
for type check, we can use PropTypes
for validating the type of the props.
https://reactjs.org/docs/typechecking-with-proptypes.html We can use better-docs
only to generate documentation from jsdoc
.
@vasynizami make those changes
Is your feature request related to a problem? Please describe. We have various github actions to check for integrity, ci and lint checks. What's missing is thorough unit test coverage which tests code logic.
Features like #106 must be testable.
Describe the solution you'd like Add jest testing framework;
See; https://jestjs.io/docs/en/getting-started.html ; In the deps in package.json add ONLY latest versions "dependencies": { "babel-core" "babel-jest" "babel-preset-env" "jest" }
Add presents like:
Make sure to follow our README guide and see how to run tsc runner once you have set this up;
Describe alternatives you've considered alternatives considered were karma, jasmine. but jest has a good OSS backing as well and looks easy to use.
Additional context We need to make sure developer productivity is not hindered while adopting a new test framework.