參考答案
Firstly, once I have received the technical task back from the candidate, I open up the README.md file and try to run the project. If the instructions are clear and easy to understand, this gives a great first impression. Making the hiring manager's job easier by describing how to run the tests is a really good start. Secondly, by running the tests (hopefully, they are green), I read the names given to the tests. This defines what is actually being tested, demonstrating understanding of the task itself. Thirdly, looking at the new code, have the assertions answered the right question? Especially around the negative scenario, does it handle unwelcome behavior? Too often, negative testing is misunderstood. Fourthly, when the test is focused on UI test automation, what element locators have been used? Following the hierarchy of best practices in Cypress documentation is a good reference. Obviously, the best locators are not always available to the candidate, but commenting what should be used will not go unnoticed. This is where comments in the code are allowed and should definitely be used to assist with helping the hiring manager understand your thoughts. Fifthly, has the code been structured to facilitate maintenance and stability? For example, moving setup steps to beforeEach proves you know how to make tests independent. Also, refactoring code to be easier to read and understand helps in proving your experience of working with unfriendly code.