Developed at devCodeCamp
A hands-on lab exercise focused on practicing Test Driven Development (TDD) and unit testing in JavaScript using Jest. This project demonstrates how writing tests before implementation helps build reliable, maintainable applications through rigorous test coverage of individual app features and functions.
Test Driven Development (TDD) is an approach where tests are written before the code itself, guiding development and ensuring correctness from the start. Unit testing focuses on evaluating the smallest isolated components of an application. By applying unit TDD, I guarantee each function and feature performs as expected, leading to robust and predictable software.
- Demonstrates core TDD principles
- Automated white-box unit testing of individual JavaScript functions
- Ensures high code reliability and maintainability
- JavaScript
- Jest (unit test framework)
- Clone the repository:
git clone https://github.com/thompsonmikej/TDD-Unit-Testing-TS-LAB.git cd TDD-Unit-Testing-TS-LAB
- Install dependencies:
npm install
- Review or write unit tests in the
/tests
directory. - Implement or modify JavaScript functions to pass all corresponding tests.
- Run tests with:
npm test
- Strengthened discipline in writing tests before implementation.
- Improved skills in isolating logic into testable units.
- Gained confidence in code reliability through effective automated testing workflows.
- Increase test coverage for edge cases and integration scenarios.
- Add code coverage metrics.
- Integrate with CI/CD for automated test execution.
Feel free to reach out or connect:
Michael Thompson
https://www.linkedin.com/in/thompsonmikej