This course is not up to current Frontend Masters standards, but it still shows some relevant lessons on what makes code difficult to test. We now recommend you take the JavaScript Testing Practices and Principles course.

Check out a free preview of the full The Psychology of Code Testability course:
The "Write Tests First" Lesson is part of the full, The Psychology of Code Testability course featured in this preview video. Here's what you'd learn in this lesson:

If you want to test your software, test it at the point of writing. Once it is written, it’s too late. How would you make code that is deliberately hard to test? The difficulty is structural. The more layered the dependency, the harder it is to test. With more control over variables, testing is straight forward.

Get Unlimited Access Now