-
-
Save dolcalmi/c9867763a1171e9c2722f43c8381df74 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