fix(core): update

This commit is contained in:
2022-12-22 17:12:15 +01:00
commit 2e8d4a21a6
13 changed files with 4726 additions and 0 deletions

18
test/test.browser.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();