mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Feat: improve domain alive checking
This commit is contained in:
@@ -3,6 +3,8 @@ import { describe, it } from 'mocha';
|
||||
import { isDomainAlive, whoisExists } from './is-domain-alive';
|
||||
import { expect } from 'expect';
|
||||
|
||||
import process from 'node:process';
|
||||
|
||||
describe('whoisExists', () => {
|
||||
it('.cryptocrawler.io', () => {
|
||||
expect(whoisExists({
|
||||
@@ -59,19 +61,40 @@ describe('whoisExists', () => {
|
||||
describe('isDomainAlive', function () {
|
||||
this.timeout(10000);
|
||||
|
||||
it('.cryptocrawler.io', async () => {
|
||||
expect((await isDomainAlive('.cryptocrawler.io', true))[1]).toEqual(false);
|
||||
});
|
||||
// it('.cryptocrawler.io', async () => {
|
||||
// expect((await isDomainAlive('.cryptocrawler.io', true))[1]).toEqual(false);
|
||||
// });
|
||||
|
||||
it('.tunevideo.ru', async () => {
|
||||
expect((await isDomainAlive('.tunevideo.ru', true))[1]).toEqual(false);
|
||||
});
|
||||
// it('.tunevideo.ru', async () => {
|
||||
// expect((await isDomainAlive('.tunevideo.ru', true))[1]).toEqual(false);
|
||||
// });
|
||||
|
||||
it('.myqloud.com', async () => {
|
||||
expect((await isDomainAlive('.myqloud.com', true))[1]).toEqual(true);
|
||||
});
|
||||
// it('.myqloud.com', async () => {
|
||||
// expect((await isDomainAlive('.myqloud.com', true))[1]).toEqual(true);
|
||||
// });
|
||||
|
||||
it('discount-deal.org', async () => {
|
||||
expect((await isDomainAlive('discount-deal.org', false))[1]).toEqual(false);
|
||||
// it('discount-deal.org', async () => {
|
||||
// expect((await isDomainAlive('discount-deal.org', false))[1]).toEqual(false);
|
||||
// });
|
||||
|
||||
// it('ithome.com.tw', async () => {
|
||||
// expect((await isDomainAlive('ithome.com.tw', false))[1]).toEqual(true);
|
||||
// });
|
||||
|
||||
// it('flipkart.com', async () => {
|
||||
// expect((await isDomainAlive('flipkart.com', false))[1]).toEqual(true);
|
||||
// });
|
||||
|
||||
// it('lzzyimg.com', async () => {
|
||||
// expect((await isDomainAlive('.lzzyimg.com', true))[1]).toEqual(true);
|
||||
// });
|
||||
|
||||
// it('tayfundogdas.me', async () => {
|
||||
// expect((await isDomainAlive('.tayfundogdas.me', true))[1]).toEqual(true);
|
||||
// });
|
||||
|
||||
it('hamdandates.com', async () => {
|
||||
process.env.DEBUG = 'true';
|
||||
expect((await isDomainAlive('.hamdandates.com', true))[1]).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user