Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add issuer name tests. #47

Merged
merged 4 commits into from
Dec 15, 2023
Merged

Add issuer name tests. #47

merged 4 commits into from
Dec 15, 2023

Conversation

aljones15
Copy link
Contributor

@aljones15 aljones15 commented Dec 12, 2023

Adds a test for "If present, the value of the issuer.name property MUST be a string or a language value object as described in 10.1 Language and Base Direction."

  1. create an invalid "value object" with an extra prop like "url"
  2. create a value object array with multiple languages
  3. add a test with @direction

@aljones15 aljones15 self-assigned this Dec 12, 2023
@aljones15 aljones15 requested a review from BigBlueHat December 12, 2023 14:13
Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aljones15 good start. I think key to these specific tests will be negative versions. The "value object" for example, MUST NOT have any additional properties. So the following would be an invalid value for name:

{
      "@value":"ExampleIssuer",
      "@language": "en",
      "url": "http://example.com/issuer" 
    }

And arrays of value objects are also valid--to support multiple languages.

We should also get an @direction example tested in their also.

Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thank you!

tests/10-vcdm2.js Outdated Show resolved Hide resolved
@JSAssassin
Copy link
Contributor

Also need to add a changelog entry for the test like in the other PR.

@aljones15 aljones15 merged commit cb6b6ef into main Dec 15, 2023
2 checks passed
@aljones15 aljones15 deleted the add-issuer-name-test branch December 15, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants