jeudi 20 août 2015

Recording DNS lookup tests

For HTTP I can use a library like node-replay or sepia to record any responses to fixtures that I can use on new test runs.

I'm building a simple library where I use DNS lookup/resolve, so I want to record this and play back the response so tests won't break in the future (should a domain I test suddenly be taken for example) and because of speed.

How should I be testing my library if I don't want to do real lookups for each test?

Aucun commentaire:

Enregistrer un commentaire