add DNS service test
This commit is contained in:
parent
af903ef430
commit
7b61a14d2c
1 changed files with 0 additions and 4 deletions
|
@ -19,10 +19,6 @@ describe('DnsService', () => {
|
||||||
dnsLookupMock = (dns.lookup as unknown) as jest.Mock;
|
dnsLookupMock = (dns.lookup as unknown) as jest.Mock;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(service).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return true for a valid URL', async () => {
|
it('should return true for a valid URL', async () => {
|
||||||
dnsLookupMock.mockImplementation((hostname, callback) => callback(null, '1.1.1.1'));
|
dnsLookupMock.mockImplementation((hostname, callback) => callback(null, '1.1.1.1'));
|
||||||
expect(await service.isValidUrl('http://example.com')).toBe(true);
|
expect(await service.isValidUrl('http://example.com')).toBe(true);
|
||||||
|
|
Loading…
Reference in a new issue