Files
webjwt/test/test.node+chromium.ts
T

19 lines
513 B
TypeScript

import { expect, tap } from '@git.zone/tstest/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));
});
export default tap.start();