fix(core): update
This commit is contained in:
26
test/test.ts
26
test/test.ts
@ -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();
|
||||
|
Reference in New Issue
Block a user