Running Netlify Dev on a different TLD than localhost

For testing purposes, it would be great if I could specify a different TLD for local development than localhost - something like sitename.test - is this even possible?

I would think that would work fine. It’s more about how you set up your development machine than netlify dev. What happens when you try?