Start by writing a test for the smallest unit of behavior you can. In this section, this will usually mean checking to see if an expected output occurs when a function is called. In functional programming, a function always returns the same output. We'll discuss this more in a future lesson. This actually makes functional programs easier to test than object-oriented programs.
Verify that the test fails. The function should be correctly called but the expected output won't be returned because we haven't added code to the function body yet.
Get the test passing. This is when you'll use the functional programming techniques we learn throughout this section.
So why aren't we including webpack, testing, and Jest with this section's lessons if we still expect you to write tests? Well, at this point in the program, you are almost ready to continue onto an internship or a future career. It's important to be able to retrieve skills you've learned in the past and refresh them as needed. This is an essential skill for developers. You will learn many things throughout your career — and you will forget many, too. There will not always be a tutorial to help you along the way as there often is with Learn How To Program.
Finally, we want the lessons in this section to focus entirely on functional programming. Functional programming is challenging to learn for new developers. Cluttering up the lessons with extraneous steps on incorporating Jest, writing tests, and adding webpack will detract from the key concepts in this section — especially since you've already learned how to use these tools!
You may also want to update your ESLint configuration to include functional programming rules. If so, we recommend the eslint-plugin-fp library: