19 lines
554 B
TypeScript
19 lines
554 B
TypeScript
import { tap, expect } from '../ts/index.js';
|
|
|
|
import { tapNodeTools } from '../ts_node/index.js';
|
|
|
|
tap.test('should execure a command', async () => {
|
|
const result = await tapNodeTools.runCommand('ls -la');
|
|
expect(result.exitCode).toEqual(0);
|
|
});
|
|
|
|
tap.test('should create a https cert', async () => {
|
|
const { key, cert } = await tapNodeTools.createHttpsCert('localhost');
|
|
console.log(key);
|
|
console.log(cert);
|
|
expect(key).toInclude('-----BEGIN RSA PRIVATE KEY-----');
|
|
expect(cert).toInclude('-----BEGIN CERTIFICATE-----');
|
|
});
|
|
|
|
tap.start();
|