fix(core): update

This commit is contained in:
2022-12-22 17:21:43 +01:00
parent 15525b4731
commit fcc2bc2759
6 changed files with 33 additions and 8 deletions

18
test/test.both.ts Normal file
View File

@@ -0,0 +1,18 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as webjwt from '../ts/index.js';
tap.test('first test', async () => {
const originalString = JSON.stringify({
a: {
"complex_2": {
"object": "yes",
}
}
});
const stringToDecode = `abc.${btoa(originalString)}.rthgf`;
const result = webjwt.getDataFromJwtString(stringToDecode);
expect(result.a['complex_2'].object).toEqual('yes');
console.log(JSON.stringify(result, null, 2));
});
tap.start();