Created
July 18, 2019 10:22
-
-
Save christianhaller3000/b6aaa9cd4c911da2df0b763a5c3050d3 to your computer and use it in GitHub Desktop.
Mock node dns resolver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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