This commit is contained in:
2025-05-04 10:29:33 +00:00
parent 1698abef16
commit 0c6da9ff74
6 changed files with 73 additions and 33 deletions

View File

@ -28,5 +28,20 @@ tap.test('constructor accepts valid challengeHandlers', async () => {
});
expect(sa).toBeInstanceOf(SmartAcme);
});
// Wildcard certificate stub for integration mode
tap.test('get wildcard certificate stub in integration mode', async () => {
const sa = new SmartAcme({
accountEmail: 'domains@lossless.org',
certManager: new MemoryCertManager(),
environment: 'integration',
retryOptions: {},
challengeHandlers: [new DummyHandler()],
});
await sa.start();
const domainWildcard = '*.example.com';
const cert = await sa.getCertificateForDomain(domainWildcard);
expect(cert.domainName).toEqual(domainWildcard);
await sa.stop();
});
export default tap.start();