mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-26 18:50:39 -06:00
17 lines
644 B
TypeScript
17 lines
644 B
TypeScript
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
|
|
|
import { expect } from 'chai'
|
|
import { isResolvingToUnicastOnly } from '@server/helpers/dns'
|
|
|
|
describe('DNS helpers', function () {
|
|
|
|
it('Should correctly check unicast IPs', async function () {
|
|
expect(await isResolvingToUnicastOnly('cpy.re')).to.be.true
|
|
expect(await isResolvingToUnicastOnly('framasoft.org')).to.be.true
|
|
expect(await isResolvingToUnicastOnly('8.8.8.8')).to.be.true
|
|
|
|
expect(await isResolvingToUnicastOnly('127.0.0.1')).to.be.false
|
|
expect(await isResolvingToUnicastOnly('127.0.0.1.cpy.re')).to.be.false
|
|
})
|
|
})
|