Furthermore, this task is technically labelled as a recovery type (as seen in episode 7), which means that even in a multi-file environment, we can control which parts of the code can be modified by the user (in this case, the whole .js file).
Similar to other front-end tasks, the tests are administered using a selenium browser, which renders the page within the DOM, allowing it to check if the elements’ properties are within expected ranges. Since this project involves a .js file, the selenium browser can also interact with the page and check if it’s having the intended effect on other elements.
And since each of these interactions can be separated into distinct tests, the user gets detailed information on what they were able to do correctly and what still needs to be done. This has additional benefits to hiring managers, as they receive a more detailed understanding of how the candidate performed (eg: they passed 75% of the tests, rather than a simple pass or fail result).