I'm about to transfer a domain from one registrar and DNS provider to another, and I want to test the new DNS host before starting the transfer. The new host provides plain DNS service beforehand, so the domain can be set up there with all records in place; this can then be tested by looking up every entry in it using
dig @newserver hostname etc. However, this doesn't allow testing of the name server settings. My thinking was that I could create hosts file entries for the NS records, and thus have it look up entries on the new name server, but that didn't work. Next up I tried running a local dnsmasq server serving up static locally-defined records for the NS entries pointing the old provider's DNS server names to the new provider's IPs, and while manual dig queries result in the expected IPs, running in a browser does not (even if I clear local caches).
How can I achieve this?