Files
inji-wallet/shared/VCFormat.test.ts
Kaushik Gupta 09a47aebed Injimob 3792 code coverage (#2254)
* INJIMOB-3792: Added tests increase code coverage

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Test-covrage fix

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Fix failing snapshot test

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792: Test-coverage suggestion fix

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 code-coverage reviews fixes

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Refractoring test files for coverage enhancement

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Refractoring changes for code-coverage

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Refractoring changes in test files for code-coverage

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Fix snapshot test files for code-coverage

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

* INJIMOB-3792 Enhance test files for better code-coverage

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>

---------

Signed-off-by: Kaushik Gupta <146950347+Kaushikgupta469@users.noreply.github.com>
Signed-off-by: Swati Goel <meet2swati@gmail.com>
Co-authored-by: Swati Goel <meet2swati@gmail.com>
2026-03-16 13:21:11 +05:30

44 lines
1.2 KiB
TypeScript

import {VCFormat} from './VCFormat';
describe('VCFormat', () => {
it('should have ldp_vc format', () => {
expect(VCFormat.ldp_vc).toBe('ldp_vc');
});
it('should have mso_mdoc format', () => {
expect(VCFormat.mso_mdoc).toBe('mso_mdoc');
});
it('should have vc_sd_jwt format', () => {
expect(VCFormat.vc_sd_jwt).toBe('vc+sd-jwt');
});
it('should have dc_sd_jwt format', () => {
expect(VCFormat.dc_sd_jwt).toBe('dc+sd-jwt');
});
it('should have jwt_vc_json format', () => {
expect(VCFormat.jwt_vc_json).toBe('jwt_vc_json');
});
it('should have exactly 5 formats', () => {
const formatCount = Object.keys(VCFormat).length;
expect(formatCount).toBe(5);
});
it('should allow access via enum key', () => {
expect(VCFormat['ldp_vc']).toBe('ldp_vc');
expect(VCFormat['mso_mdoc']).toBe('mso_mdoc');
expect(VCFormat['vc_sd_jwt']).toBe('vc+sd-jwt');
expect(VCFormat['dc_sd_jwt']).toBe('dc+sd-jwt');
expect(VCFormat['jwt_vc_json']).toBe('jwt_vc_json');
});
it('should have all unique values', () => {
const values = Object.values(VCFormat);
const uniqueValues = new Set(values);
expect(uniqueValues.size).toBe(values.length);
});
});