]>
Commit | Line | Data |
---|---|---|
f33e5159 C |
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | ||
3 | import 'mocha' | |
4 | import { expect } from 'chai' | |
5 | import { isResolvingToUnicastOnly } from '@server/helpers/dns' | |
6 | ||
7 | describe('DNS helpers', function () { | |
8 | ||
9 | it('Should correctly check unicast IPs', async function () { | |
10 | expect(await isResolvingToUnicastOnly('cpy.re')).to.be.true | |
11 | expect(await isResolvingToUnicastOnly('framasoft.org')).to.be.true | |
12 | expect(await isResolvingToUnicastOnly('8.8.8.8')).to.be.true | |
13 | ||
14 | expect(await isResolvingToUnicastOnly('127.0.0.1')).to.be.false | |
15 | expect(await isResolvingToUnicastOnly('127.0.0.1.cpy.re')).to.be.false | |
16 | }) | |
17 | }) |