update
This commit is contained in:
@ -18,4 +18,12 @@ tap.test('should return undefined for deeper domain', async () => {
|
||||
expect(result).toEqual(undefined);
|
||||
});
|
||||
|
||||
// Wildcard domain handling
|
||||
tap.test('should strip wildcard prefix and return base domain', async () => {
|
||||
const matcher = new SmartacmeCertMatcher();
|
||||
expect(matcher.getCertificateDomainNameByDomainName('*.example.com')).toEqual('example.com');
|
||||
expect(matcher.getCertificateDomainNameByDomainName('*.sub.example.com')).toEqual('sub.example.com');
|
||||
expect(matcher.getCertificateDomainNameByDomainName('*.a.b.example.com')).toEqual('a.b.example.com');
|
||||
});
|
||||
|
||||
export default tap.start();
|
Reference in New Issue
Block a user