-
Notifications
You must be signed in to change notification settings - Fork 54
Description
The templates generated by Celtrix provide an excellent starting point for development. However, to be truly "production-ready," a project needs a testing framework. Currently, developers have to manually set up their entire testing environment, which can be time-consuming.
I propose adding a pre-configured testing environment to the templates, starting with the React-based stacks (like MERN). This would include:
- Install Dependencies: Automatically include
jest,babel-jest,@testing-library/react, and@testing-library/jest-domas development dependencies. - Configuration: Add the necessary configuration files, such as
jest.config.jsand a Babel config (.babelrc) if needed for Jest to understand JSX. - Example Test: Include a simple "smoke test" for a component (e.g.,
App.test.js) to prove that the testing setup is working correctly out-of-the-box. - Add
npm testscript: Add a script topackage.jsonso developers can run their tests with a simplenpm testcommand.
Additional context
Integrating a testing framework would be a significant step forward for Celtrix, making the generated projects more robust and complete. This feature would save developers a lot of setup time and encourage best practices from the start.
I am excited to take on this feature for #Hacktoberfest. Please let me know if this is a valuable addition to the project!