It's better to clean up the registry in a `beforeEach` hook.

Your way the cleanup is not performed when `expect` throws an exception.