Summary
This chapter has shown you three techniques to shorten your test suites: page object models for Playwright end-to-end tests, action helpers for Vitest unit tests, and factory methods. Keeping test suites clear and meaningful is key to keeping them easily maintainable.
In this next chapter, we’ll look at a more involved way of reducing unit test code – writing your own custom matchers.