ReviewOS

also looking at this

stacks/ts-dns

fix: allow underscores in domain labels

#2057
Open lu-zero wants to merge fix/allow-underscores-in-domain-labels into main
2 files +19 -2
test/dnsx.test.tsmodified+17-0
Changes to test/dnsx.test.ts
@@ -187,6 +187,23 @@ describe('DnsClient', () => {
187187 })).toThrow()
188188 })
189189
190 it('should accept underscores in domain labels (DKIM, DMARC, SRV)', () => {
191 expect(() => new DnsClient({
192 domains: ['selector1._domainkey.example.com'],
193 type: 'TXT',
194 })).not.toThrow()
195
196 expect(() => new DnsClient({
197 domains: ['_dmarc.example.com'],
198 type: 'TXT',
199 })).not.toThrow()
200
201 expect(() => new DnsClient({
202 domains: ['_sip._tcp.example.com'],
203 type: 'SRV',
204 })).not.toThrow()
205 })
206
190207 it('should handle invalid record types', () => {
191208 expect(() => new DnsClient({
192209 domains: ['example.com'],