feat(ts_node): Add support for HTTPS certificate creation

This commit is contained in:
2024-09-18 00:41:14 +02:00
parent 4358e1d64d
commit 61c493ce72
6 changed files with 69 additions and 22 deletions

View File

@ -7,4 +7,12 @@ tap.test('should execure a command', async () => {
expect(result.exitCode).toEqual(0);
});
tap.test('should create a https cert', async () => {
const { key, cert } = await tapNodeTools.createHttpsCert('localhost', 'localhost.key', 'localhost.cert');
console.log(key);
console.log(cert);
expect(key).toInclude('-----BEGIN PRIVATE KEY-----');
expect(cert).toInclude('-----BEGIN CERTIFICATE-----');
});
tap.start();