Skip to content

Commit

Permalink
automated input
Browse files Browse the repository at this point in the history
  • Loading branch information
dovgopoly committed May 9, 2024
1 parent 31a1060 commit 1dd1728
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions test/CircomZKit.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import { CircomZKit } from "../src";
import { ManagerZKit } from "../src/ManagerZKit";
import { CircomZKit, ManagerZKit } from "../src";

jest.mock("readline", () => ({
createInterface: jest.fn().mockReturnValue({
question: jest
.fn()
.mockImplementation((_query: string, cb: (answer: string) => void) => {
cb("Y");
}),
close: jest.fn().mockImplementation(() => undefined),
}),
}));

describe("happy flow", function () {
test("happy flow", async () => {
Expand All @@ -23,5 +33,5 @@ describe("happy flow", function () {

console.log(await circuit.verifyProof(proof));
console.log(await circuit.generateCalldata(proof));
}, 20000);
});
});

0 comments on commit 1dd1728

Please sign in to comment.