UNPKG

@sd-jwt/core

Version:

sd-jwt draft 7 implementation in typescript

16 lines (14 loc) 428 B
import { describe, expect, test } from 'vitest'; import { SDJWTException } from '../../utils/error'; describe('Error tests', () => { test('Detail', () => { try { throw new SDJWTException('msg', { info: 'details' }); } catch (e: unknown) { const exception = e as SDJWTException; expect(exception.getFullMessage()).toEqual( 'SDJWTException: msg - {"info":"details"}', ); } }); });