When designing an API is beneficial to write demo usage code. Like the synopsis part in a CPAN module. These can be tested against proof of concepts. That's the nucleus of the project.
When adjusting the spec you need to adjust those demos, hence code and test suite grow in the process.
After those are sufficiently stable you start wiring the POCs into modules with more specific unit tests, for instanceto cover edge cases.
But the tests you wrote while designing the API are already there.
You may have decided to change the internal architecture in the middle and split the code into multiple dependend modules behind the API. Different modules will have different unit test suites.
For me it's an iterative process, but this first layer of API tests will stay quite stable while the POCs will only be kept for historical reasons.
These API tests are the first tiny eggs if you want...
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery