Testing API rate limits?

I’m working on a NodeJS application interacting with the REST API. To be a good citizen I want to suspend operation when I hit the rate limit. Mapped out some code for it. Now I need to test it.

Is there a way how I can, for a given duration, limit my rate e.g. to 5/hour?

This would make testing so much easier. Then after the test, reset it to what my org entitlements are.