Files
inji-wallet/shared/VCFormat.test.ts
Kaushik Gupta 33c6caa08a INJIMOB-3246 Code coverage for Inji-Wallet repo increase above 5% (#2108)
* INJIMOB-3246 Code coverage for Inji-Wallet repo increase above 5%

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* INJIMOB-3246: added snapshot tests and coverage increased to +4%

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* removed duplicated lines

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* Added updateCredentialInformation tests

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* added code rabbit changes

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* removed platform-specific tests without mocking

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

* standardize mocks in VcItemContainerProfileImage tests

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>

---------

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>
2025-11-07 11:10:37 +05:30

38 lines
1.0 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 exactly 4 formats', () => {
const formatCount = Object.keys(VCFormat).length;
expect(formatCount).toBe(4);
});
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');
});
it('should have all unique values', () => {
const values = Object.values(VCFormat);
const uniqueValues = new Set(values);
expect(uniqueValues.size).toBe(values.length);
});
});