To add to this, editor commands to quickly switch to your test file, auto generate test boilerplate and run the currently highlighted test are super helpful to speed up this loop.
I actually did a pair programming session with JBrains on TDD to enhance my skill. What he explained to me was exactly this.
You need to test something, for example you want to test how regexp works. You start writing tests with your expectations and go on.
After you are satisfied, you actually keep this in a package for reference and documentation on works the library.