Skip to content

Commit

Permalink
refactor: increase tests timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
edytapawlak committed Sep 9, 2024
1 parent bfc79da commit 368ff93
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions bindings/node.js/client/src/issuing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,9 @@ export async function verify(
switch (tst) {
case VcState.Issued:
return JSON.stringify({ verified: true, status: "issued" });
break;
case VcState.NotIssued:
return JSON.stringify({ verified: false, status: "not issued" });
break;
case VcState.Revoked:
return JSON.stringify({ verified: false, status: "revoked" });
break;
default:
console.log("No match found");
}
}
8 changes: 1 addition & 7 deletions bindings/node.js/test/issuing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { tmpdir } from "os";

import { mechanics, issuing } from "../client/src/index";

jest.setTimeout(30000);
let infra = require('./infrastructure.json');

describe("Issuing", () => {
Expand All @@ -27,7 +28,6 @@ describe("Issuing", () => {
);

let witnessOobi = infra.witnesses.map(witness => JSON.stringify(witness));
console.log(witnessOobi);
let inceptionConfiguration = new mechanics.InceptionConfiguration()
.withCurrentKeys([pk])
.withNextKeys([pk2])
Expand All @@ -50,19 +50,15 @@ describe("Issuing", () => {
);

let registryId = await signingIdentifier.registryId();
console.log(registryId);

let json = { hello: "world", ri: registryId };
console.log(JSON.stringify(json));

let vcHash = await issuing.issue(
signingIdentifier,
JSON.stringify(json),
signer
);

console.log(await signingIdentifier.getKel());

// Setup identifier for verification
const currentVerifierKeyManager = new KeyPair();
const nextVerifierKeyManager = new KeyPair();
Expand Down Expand Up @@ -110,8 +106,6 @@ describe("Issuing", () => {
// Query KEL
let oobis = await signingIdentifier.oobi();
let registryOobi = await signingIdentifier.registryIdOobi();
console.log(registryOobi[0]);
console.log(oobis[0]);

let res = await issuing.verify(
verifierIdentifier,
Expand Down
3 changes: 2 additions & 1 deletion bindings/node.js/test/mechanics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import * as path from "path";
import { tmpdir } from "os";
import { VcState } from "mechanics";

jest.setTimeout(30000);

let infra = require("./infrastructure.json");
/**
* Helper function for sending new events to witnesses and collecting their receipts
Expand Down Expand Up @@ -192,7 +194,6 @@ describe("Mechanics", () => {
let st = await verifierIdentifier.findState(
await signingIdentifier.getId()
);
// console.log(st)

// Query TEL
let registry_oobi = await signingIdentifier.registryIdOobi();
Expand Down
1 change: 1 addition & 0 deletions bindings/node.js/test/signing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { tmpdir } from "os";

import { mechanics, signing } from "../client/src/index";

jest.setTimeout(30000);
let infra = require('./infrastructure.json');

describe("Signing", () => {
Expand Down

0 comments on commit 368ff93

Please sign in to comment.