From 9ba74cb584f642c0f290be2f3923b613bf09f7d7 Mon Sep 17 00:00:00 2001 From: Daniel Augusto de Melo Santos Date: Mon, 8 Mar 2021 14:47:49 -0300 Subject: [PATCH 1/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a49f2f..68dbf62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@identity.com/uca", - "version": "1.0.26", + "version": "1.0.27", "description": "Provides functionality around User Collectable Attributes (UCA)", "main": "src/index.js", "module": "dist/es/index.js", From a674b3fd54cc4eb276d54a9bfd15ebb71204522f Mon Sep 17 00:00:00 2001 From: Daniel Augusto de Melo Santos Date: Mon, 8 Mar 2021 14:48:28 -0300 Subject: [PATCH 2/3] Update definitions.js --- src/definitions.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/definitions.js b/src/definitions.js index 1e33837..18c175e 100644 --- a/src/definitions.js +++ b/src/definitions.js @@ -712,16 +712,6 @@ const definitions = [ identifier: 'cvc:Type:documentType', version: '1', type: 'String', - enum: { - UK_BIOMETRIC_RESIDENCE_PERMIT: 'uk_biometric_residence_permit', - BIOMETRIC_RESIDENCE_PERMIT: 'biometric_residence_permit', - DRIVING_LICENSE: 'driving_license', - NATIONAL_IDENTITY_CARD: 'national_identity_card', - PASSPORT: 'passport', - TAX_ID: 'tax_id', - UNKNOWN: 'unknown', - VOTER_ID: 'voter_id', - }, }, { identifier: 'cvc:Document:type', From ec807dc045af7b5fe3807ff2234f4d0e3dc6813a Mon Sep 17 00:00:00 2001 From: Daniel Augusto de Melo Santos Date: Mon, 8 Mar 2021 16:30:04 -0300 Subject: [PATCH 3/3] Update UserCollectableAttributes.test.js --- __test__/UserCollectableAttributes.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__test__/UserCollectableAttributes.test.js b/__test__/UserCollectableAttributes.test.js index 4109569..45b4a2d 100644 --- a/__test__/UserCollectableAttributes.test.js +++ b/__test__/UserCollectableAttributes.test.js @@ -96,13 +96,13 @@ describe('UCA Constructions tests', () => { expect(createUCA).toThrow(); }); - test('Should throw error when constructing UCA with a value not in the enum definition', () => { + test('Should not throw an error when constructing UCA with any document type', () => { const identifier = 'cvc:Document:type'; - const value = 'invalid-document-type'; + const value = 'any-document-type'; function createUCA() { return new UCA(identifier, value); } - expect(createUCA).toThrowError(); + expect(createUCA).not.toThrowError(); }); test('Should construct UCA when value is in the enum definition', () => {