You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
625 B

const chai = require("chai");
const path = require("path");
const tester = require("circom").tester;
const mimcjs = require("../src/mimc7.js");
describe("MiMC Circuit test", function () {
let circuit;
this.timeout(100000);
before( async () => {
circuit = await tester(path.join(__dirname, "circuits", "mimc_test.circom"));
});
it("Should check constrain", async () => {
const w = await circuit.calculateWitness({x_in: 1, k: 2}, true);
const res2 = mimcjs.hash(1,2,91);
await circuit.assertOut(w, {out: res2});
await circuit.checkConstraints(w);
});
});