Today I completed week 4 of Meta’s javascript module in their frontend course, which was about testing. Meta in particular teaches the Jest framework which they made.
Software testing is a much deeper and more brain bending topic than I realized. The testing process is based around “expectations” which describe proper behavior for your code. This leads to test-driven development. Normally you have some requirement then you program a feature to satisfy it, then test the code once it is finished. But with the test-driven development framework your first step in to write a test that currently fails but will pass once the requirement is satisfied. Then you write the code until your test works. Any refactoring from that point onward is aided by the fact you have this testing framework to make sure everything continues to work as expected.
No comments:
Post a Comment