Skip to content

@context test not spec compliant #53

@PatStLouis

Description

@PatStLouis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions