This type of order will most probably get the developer into confirmation bias: writing the tests that show the code works.
The best for me is to thing about how would I test if the solution will work, then implement the solution and then run the tests. This why I try to compensate a little for comfirmation bias.