This is great. The tests in this case are the spec. When you give the agent something concrete to fail against, it knows what done looks like.
The problem is if you skip that step and ask Claude to write the tests after.