Skip to content

Commit

Permalink
Update extractClaims.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jfelixh authored and actions-user committed Jun 10, 2024
2 parents 3a7a298 + 0a5deba commit 2f4cc92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions vclogin/__tests__/extractClaims.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ describe("extractClaims", () => {
it("all subject claims from an EmployeeCredential are extracted", () => {
var claims = extractClaims(vpEmployee, policyAcceptAnything);
var expected = {
tokenAccess: {
},
tokenAccess: {},
tokenId: {
subjectData: {
id: "did:key:z6MkkdC46uhBGjMYS2ZDLUwCrTWdaqZdTD3596sN4397oRNd",
Expand All @@ -33,7 +32,6 @@ describe("extractClaims", () => {
hasJurisdiction: "GER",
surname: "Surname",
},

},
};
expect(claims).toStrictEqual(expected);
Expand Down Expand Up @@ -64,8 +62,7 @@ describe("extractClaims", () => {
it("all designated claims from an EmployeeCredential are extracted", () => {
var claims = extractClaims(vpEmployee, policyEmployeeFromAnyone);
var expected = {
tokenAccess: {
},
tokenAccess: {},
tokenId: {
email: "test@test.com",
name: "Name Surname",
Expand Down
2 changes: 1 addition & 1 deletion vclogin/lib/extractClaims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ const extractClaimsFromVC = (VC: any, policy: LoginPolicy) => {
if (!newPath) {
throw Error(
"New path not defined for multi-valued claim: " +
claim.claimPath,
claim.claimPath,
);
}

Expand Down

0 comments on commit 2f4cc92

Please sign in to comment.