BREAKING CHANGE(core): switch to esm
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartjwt from '../ts/index';
|
||||
import * as smartjwt from '../ts/index.js';
|
||||
|
||||
let smartjwtInstance: smartjwt.SmartJwt;
|
||||
let testJwt: string;
|
||||
@ -22,7 +22,7 @@ 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).to.not.be.null;
|
||||
expect(data).not.toBeNull();
|
||||
console.log(data);
|
||||
console.log(smartjwtInstance.publicKey.toPemString());
|
||||
});
|
||||
@ -38,7 +38,7 @@ tap.test('should not verify a wrong jwt', async () => {
|
||||
} catch (e: any) {
|
||||
error = e;
|
||||
}
|
||||
expect(error).to.be.instanceOf(Error);
|
||||
expect(error).toBeInstanceOf(Error);
|
||||
});
|
||||
|
||||
tap.test('should verify a jwt on another instance', async () => {
|
||||
|
Reference in New Issue
Block a user