add DNS service test

This commit is contained in:
Kfir Dayan 2024-01-21 11:56:13 +02:00
parent af903ef430
commit 7b61a14d2c

View file

@ -19,10 +19,6 @@ describe('DnsService', () => {
dnsLookupMock = (dns.lookup as unknown) as jest.Mock;
});
it('should be defined', () => {
expect(service).toBeDefined();
});
it('should return true for a valid URL', async () => {
dnsLookupMock.mockImplementation((hostname, callback) => callback(null, '1.1.1.1'));
expect(await service.isValidUrl('http://example.com')).toBe(true);