fix(core): update

This commit is contained in:
2023-11-25 01:38:43 +01:00
parent a08d67c8df
commit 8ee3aa41a0
8 changed files with 129 additions and 338 deletions

View File

@ -1,8 +1,26 @@
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
import * as smartsign from '../ts/index.js'
import * as smartsign from '../ts/index.js';
import * as smartfile from '@push.rocks/smartfile';
import * as smartshell from '@push.rocks/smartshell';
tap.test('first test', async () => {
console.log(smartsign)
tap.preTask('create signing certificate', async () => {
const certExists = await smartfile.fs.fileExists('./.nogit/certificate.p12');
console.log('certExists:', certExists);
if (!certExists) {
const smartshellInstance = new smartshell.Smartshell({
executor: 'bash',
});
await smartshellInstance.exec(`bash -x ./scripts/create.p12.sh`)
}
})
tap.start()
let testSmartSign: smartsign.SmartSign;
tap.test('should create a new SmartSign instance', async () => {
const certSmartfile = await smartfile.SmartFile.fromFilePath('./.nogit/certificate.p12');
testSmartSign = new smartsign.SmartSign(certSmartfile.contentBuffer);
expect(testSmartSign).toBeInstanceOf(smartsign.SmartSign);
})
await tap.start();