also looking at this
fix: allow underscores in domain labels
#2057
2 files
+19
-2
| @@ -187,6 +187,23 @@ describe('DnsClient', () => { | ||
| 187 | 187 | })).toThrow() |
| 188 | 188 | }) |
| 189 | 189 | |
| 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 | ||
| 190 | 207 | it('should handle invalid record types', () => { |
| 191 | 208 | expect(() => new DnsClient({ |
| 192 | 209 | domains: ['example.com'], |