I think it's not a waste, because if you first make the test and after the programming, you have a guidelines to make your code work and do the correct approach, if you make the test after the coding you maybe can have some errors and make bad tests.