Back-end Engineering
112 learners
Isolating Dependencies with Test Doubles with TypeScript & Jest
Discover the pivotal role of test doubles in modern software testing. This introductory session will guide you through the essentials of dummies, stubs, spies, mocks, and fakes. Learn how these powerful tools help you isolate units under test, control behavior, and build reliable, fast, and maintainable tests. Step into the world of test doubles and elevate your software development skills.
Jest
TypeScript
5 lessons
25 practices
3 hours
Programming, Algorithms, and Data Structures
Lessons and practices
Testing Email Parameters with Dummies
Enhancing the Logger Interface
Fix the Test Suite Bug
Implementing Dummies in Test Suites
Master Dummies in Test Suites
Stubbing for Weather Alerts
Handle freezing conditions with Stubbed data
Handling stormy conditions
Stubbing Out Lovely Weather
Refactor!
Spying on Method Calls
Spying on Urgent Notifications
Spying on Medium Priority Notifications
Spying on Multiple Method Calls
Mock Pricing Service for Testing
Verifying Dependencies Aren't Called using Mocks
Expect Exceptions for Negative Prices
Mocking Multiple Calls with Mock Implementations
Calculating Bulk Prices
Using a Fake User Repository
Expect an Exception When Adding Duplicate Users
Update a Registered User
Handle when Updating Non-Existent Users
Deactivating Users
Expect Exception when Deactivating Non-Existent Users
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