Not that I think this is anything particularly noteworthy or special but I've been working through the exercises in HtDP 2nd Edition and posting my answers up to my blog lately. I decided to try to do the exercises with Typed Racket and RackUnit (rather than using the BSL language).
I'm mentioning this here mainly so that if anyone cares to comment ("Hey Onorio--here's a better way to do that!") they can do so!
Idiomatic Racket puts test code in a test submodule. So (module+ test …), and you can (require rackunit) inside that module, define your examples and checks there, etc.
You probably already know this, but time is hard. HTDP's version may be convenient for an exercise, but don't use anything like it for production code in particular, leap seconds will screw up the calculation, and there's probably other things I'm missing.
Since you've been so kind as to share your know-how so far--is it idiomatic to keep the tests in the same source file as the code or are you simply putting them all in the same file just for purposes of illustration?
And that tip about #:type-name is very welcome as well. Some of the names I come up with are pretty clumsy; I don't think #:type-name will help with that but it's a step in the right direction.
My own preference is to keep tests inside the same file for my course projects. (When you start writing large programs — like the ones I used to assign in our Fundamentals 1 — consider reading https://felleisen.org/matthias/Thoughts/Modular_Programming.html for this kind of programing.)
The Racket standard is to split packages into three parts: code, tests, docs so that people allergic to receiving more than absolutely necessary can just ge the code.