Skip to content

Instantly share code, notes, and snippets.

@christianhaller3000
Created July 18, 2019 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save christianhaller3000/b6aaa9cd4c911da2df0b763a5c3050d3 to your computer and use it in GitHub Desktop.
Save christianhaller3000/b6aaa9cd4c911da2df0b763a5c3050d3 to your computer and use it in GitHub Desktop.
Mock node dns resolver
jest.mock("dns", () => {
return {
promises: {
Resolver: function() {
return {
resolveTxt: () => {
return ["1.1.1.1","2.2.2.2/28"];
}
};
}
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment