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

@context test not spec compliant #53

Open
PatStLouis opened this issue Apr 29, 2024 · 0 comments
Open

@context test not spec compliant #53

PatStLouis opened this issue Apr 29, 2024 · 0 comments

Comments

@PatStLouis
Copy link
Contributor

Shouldn't this test suite follow the VC data model specification?

This test checks for subsequent items to be strings, however in the spec it allows for objects:

it('credential "@context" items MUST be strings.', async function() {
        this.test.cell = {
          columnId: name,
          rowId: this.test.title
        };
        const body = createRequestBody({issuer});
        const invalidContextTypes = [{foo: true}, 4, false, null];
        for(const invalidContextType of invalidContextTypes) {
          body.credential['@context'] = invalidContextType;
          const {result, error} = await issuer.post({json: {...body}});
          shouldThrowInvalidInput({result, error});
        }
      });

The spec reads:
Subsequent items in the array MUST express context information and be composed of any combination of URIs or objects.

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

No branches or pull requests

1 participant