Perhaps my choice of words could have been better... swap out "prototype" (a hyperbolic example) in favour of "iteration" in my second paragraph and see if it makes more sense.
The central point I am trying to make is that it seems wasteful to spend time writing tests for code that may soon be deleted.
OK then, but in an iteration, you don't throw away everything you have and start from scratch. You use unit tests to check that those parts that weren't changed, weren't affected by the parts that were. Unit testing pays off especially in those scenarios.
I understand this. But writing tests as you go means you can't introduce new functional code at the same pace. Although I think it's an unsolved problem, I lean heavily towards writing tests (and documentation) towards the end of a project.