A REPL is better when prototyping but tests have a lot of value afterwards.
They're repeatable and they can be used to spot regressions.
I think that the a good workflow is to do initial experiments on a REPL followed, once I get an idea of the code will look, by writing tests and the actual code that will run in production.