mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
* 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>
38 lines
1023 B
TypeScript
38 lines
1023 B
TypeScript
import {KeyTypes} from './KeyTypes';
|
|
|
|
describe('KeyTypes', () => {
|
|
it('should have RS256 key type', () => {
|
|
expect(KeyTypes.RS256).toBe('RS256');
|
|
});
|
|
|
|
it('should have ES256 key type', () => {
|
|
expect(KeyTypes.ES256).toBe('ES256');
|
|
});
|
|
|
|
it('should have ES256K key type', () => {
|
|
expect(KeyTypes.ES256K).toBe('ES256K');
|
|
});
|
|
|
|
it('should have ED25519 key type', () => {
|
|
expect(KeyTypes.ED25519).toBe('Ed25519');
|
|
});
|
|
|
|
it('should have exactly 4 key types', () => {
|
|
const keyTypeCount = Object.keys(KeyTypes).length;
|
|
expect(keyTypeCount).toBe(4);
|
|
});
|
|
|
|
it('should allow access via enum key', () => {
|
|
expect(KeyTypes['RS256']).toBe('RS256');
|
|
expect(KeyTypes['ES256']).toBe('ES256');
|
|
expect(KeyTypes['ES256K']).toBe('ES256K');
|
|
expect(KeyTypes['ED25519']).toBe('Ed25519');
|
|
});
|
|
|
|
it('should have all unique values', () => {
|
|
const values = Object.values(KeyTypes);
|
|
const uniqueValues = new Set(values);
|
|
expect(uniqueValues.size).toBe(values.length);
|
|
});
|
|
});
|