Back-end Engineering
111 learners
Foundations of TDD in TypeScript and Jest: The Principles
This course introduces Test-Driven Development (TDD) for TypeScript projects, covering the Red-Green-Refactor workflow, TDD mindset, and setup with Jest. Learn best practices like SOLID principles and dependency injection, and explore TDD's impact on code quality and speed compared to traditional approaches.
Jest
TypeScript
6 lessons
27 practices
4 hours
Programming, Algorithms, and Data Structures
Lessons and practices
Write a Test, Watch It Fail
Make the Test Pass
Refactor for Readability and Clarity
Write another failing test
Make it pass again
Refactor to use parameterized tests
Defining the first test for Shopping Cart totals
Make it pass
Write another failing test
Make the Cart Total Function Work
Refactor Your Cart Total Function
Make it Red
Make it Green
Refactor!
Understanding Jest
Use some matchers
Manage repetitive setup with beforeEach
Group tests with nested describe() blocks
Expect an exception
Write an async test
Write your first failing test
Make it pass
Refactor
Write a test that expects logging (Red)
Make the tests pass
Refactor the UserManager Class
Refactor Tests with AAA Pattern
Meet Cosmo:
The smartest AI guide in the universe
Our built-in AI guide and tutor, Cosmo, prompts you with challenges that are built just for you and unblocks you when you get stuck.

Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal