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

Allow @context objects #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/10-issuer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ describe('Issue Credential - Data Integrity', function() {
const {result, error} = await issuer.post({json: body});
shouldThrowInvalidInput({result, error});
});
it('credential "@context" items MUST be strings.', async function() {
it('credential "@context" items MUST be strings or objects.', async function() {
this.test.cell = {
columnId: name,
rowId: this.test.title
};
const body = createRequestBody({issuer});
const invalidContextTypes = [{foo: true}, 4, false, null];
const invalidContextTypes = [4, false, null, []];
for(const invalidContextType of invalidContextTypes) {
body.credential['@context'] = invalidContextType;
const {result, error} = await issuer.post({json: {...body}});
Expand Down
4 changes: 2 additions & 2 deletions tests/11-issuer-jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ describe('Issue Credential - JWT', function() {
const {result, error} = await issuer.post({json: body});
shouldThrowInvalidInput({result, error});
});
it('credential "@context" items MUST be strings.', async function() {
it('credential "@context" items MUST be strings or objects.', async function() {
this.test.cell = {
columnId: name,
rowId: this.test.title
};
const body = createRequestBody({issuer});
const invalidContextTypes = [{foo: true}, 4, false, null];
const invalidContextTypes = [4, false, null, []];
for(const invalidContextType of invalidContextTypes) {
body.credential['@context'] = invalidContextType;
const {result, error} = await issuer.post({json: {...body}});
Expand Down