fix(build): migrate project metadata and tooling config to smartconfig

This commit is contained in:
2026-04-25 17:47:41 +00:00
parent 6bb28757e0
commit acbc27ed9a
10 changed files with 5477 additions and 4175 deletions
+4 -5
View File
@@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartjwt from '../ts/index.js';
let smartjwtInstance: smartjwt.SmartJwt;
@@ -21,7 +21,6 @@ tap.test('should create a new jwt', async () => {
tap.test('should verify a jwt', async () => {
const data = await smartjwtInstance.verifyJWTAndGetData(testJwt);
// tslint:disable-next-line: no-unused-expression
expect(data).not.toBeNull();
console.log(data);
console.log(smartjwtInstance.publicKey.toPemString());
@@ -32,7 +31,7 @@ tap.test('should not verify a wrong jwt', async () => {
const jwt2Array = jwt2.split('.');
const testJwtArray = testJwt.split('.');
const newJwt = `${testJwtArray[0]}.${jwt2Array[1]}.${testJwtArray[2]}`;
let error: Error;
let error: Error | undefined;
try {
await smartjwtInstance.verifyJWTAndGetData(newJwt);
} catch (e: any) {
@@ -44,8 +43,8 @@ tap.test('should not verify a wrong jwt', async () => {
tap.test('should verify a jwt on another instance', async () => {
const secondSmartJwtInstance = new smartjwt.SmartJwt();
secondSmartJwtInstance.setPublicPemKeyForVerification(smartjwtInstance.publicKey.toPemString());
const result = secondSmartJwtInstance.verifyJWTAndGetData(testJwt);
const result = await secondSmartJwtInstance.verifyJWTAndGetData(testJwt);
console.log(result);
});
tap.start();
export default tap.start();