What you will learn
• Writing readable and maintainable tests
• Writing tests that focus on behavior rather than implementation details
• Writing future-proof tests that survive migrations and refactorings
• Choosing the right test size
• “Mocking” without suffering using Fakes and Object Mothers
• An all-you-can-eat buffet of tips and tricks to help you adopt a Pragmatic Testing Strategy
Agenda
💻 Hands-on Exercise: First Test
• Let’s write our first test by instinct — then dissect what works and what doesn’t
👨🏻🏫 The Testing Pain
• Developers hate testing: Why, and how do we fix that?
• The Development Time Perception Bias
• What’s wrong with Unit vs. Integration taxonomy?
• Narrow vs. Wide
👨🏻🏫 Vitest
• Why Vitest?
• Pros, cons, and the future
• Migration path from Karma or Jest
👨🏻🏫 Component Testing
• Isolated vs. Shallow vs. Integration
• TestBed vs. Testing Library: What to pick from each?
💻 Hands-on Exercises: TDD & Component Testing
• Progressive Test-Driven Development
• Tips & tricks for precise and maintainable tests
• Future-proof testing with DOM-distancing and Gloves
• Zoneless-ready testing
• Debugging techniques
👨🏻🏫 Test Doubles & “Mocking”
• When, why, how, and where to “mock”
• Fake it till you mock it: picking the right Test Double
• Type-safe and maintainable doubles
• High confidence with contract testing
💻 Hands-on Exercises: Test Doubles & “Mocking”
• Narrowing down tests with Fakes
👨🏻🏫 Playwright Component Testing with Testronaut
• How is Testronaut different from anything else?
• Component Testing with Testronaut
• Using test doubles
• Debugging
• Visual regression testing that scales
👨🏻🏫 Building your Pragmatic Testing Strategy
• What to test?
• Which tool to use?
• What is the right size for a System Under Test?
• Which strategy for legacy code?
🙋 Q&A
🎁 [Bonus] Charted Coding: AI-Assisted TDD
• Leveraging AI from design doc to tidy code with more TDD and less review fatigue
Sign up to receive updates about JS Poland, including workshops, speaker previews, ticket launches, JS Awards, JavaScript Master Podcast, Behind the Code Magazine, CFP details and other exclusive content. We won’t spam you and will only send you emails we genuinely think you’ll find interesting. You can unsubscribe at any time and you can find more information here.