Skip to content

Commit

Permalink
refactor: rename variable in qr link verification
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhyen99 committed Nov 12, 2024
1 parent cd4d95a commit 174a837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/vc-test-suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn install

## Setup

There are three parts of the test suite: `Render Template 2024`, `QR Link Encryption` and `Storage`. To add your implementation to this test suite you will need to add some endpoints to your implementation manifest in `config.ts`:
There are three parts of the test suite: `Render Template 2024`, `QR Link Verification` and `Storage`. To add your implementation to this test suite you will need to add some endpoints to your implementation manifest in `config.ts`:

- A Render Template 2024 endpoint in the `RenderTemplate2024` property.
- An Encrypted QR Link in the `QrLinkEncrypted` property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ describe('QR Link Verification with encrypted data', function () {
headers,
});

data.should.not.be.null;
data.should.not.be.undefined;
data.should.not.be.empty;
data.should.be.an('object');
});

reportRow('Hash MUST exist and be a string', config.implementationName, function () {
Expand All @@ -66,22 +64,21 @@ describe('QR Link Verification with encrypted data', function () {
reportRow('Key exist and be a string', config.implementationName, function () {
expect(parsedLink.q.payload.key).to.be.a('string');
});

reportRow('Key MUST decrypt the encrypted credential', config.implementationName, async function () {
const { data } = await request({
url: parsedLink.q.payload.uri,
method,
headers,
});
const stringifyVC = decryptCredential({
const credential = decryptCredential({
...data,
key: parsedLink.q.payload.key,
});

// Assert that stringifyVC is not null, empty, or undefined
stringifyVC.should.not.be.null;
stringifyVC.should.not.be.undefined;
stringifyVC.should.not.be.empty;
credential.should.not.be.null;
credential.should.not.be.undefined;
credential.should.not.be.empty;
});
});

Expand Down

0 comments on commit 174a837

Please sign in to comment.