This commit is contained in:
2025-05-24 02:27:50 +00:00
parent f2e9ff0a51
commit 4fd3ec2958
7 changed files with 19 additions and 11 deletions

View File

@ -6,8 +6,8 @@ import * as plugins from '../ts/plugins.js';
const originalDnsResolve = plugins.dns.promises.resolve;
let mockDnsResolveImpl: (hostname: string) => Promise<string[]> = async () => ['127.0.0.1'];
// Setup mock DNS resolver
plugins.dns.promises.resolve = async (hostname: string) => {
// Setup mock DNS resolver with proper typing
(plugins.dns.promises as any).resolve = async (hostname: string) => {
return mockDnsResolveImpl(hostname);
};