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.

24 lines
738 B

2 years ago
  1. const chai = require("chai");
  2. const path = require("path");
  3. const wasm_tester = require("./../index").wasm;
  4. const F1Field = require("ffjavascript").F1Field;
  5. const Scalar = require("ffjavascript").Scalar;
  6. exports.p = Scalar.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617");
  7. const Fr = new F1Field(exports.p);
  8. const assert = chai.assert;
  9. describe("Exponentioation test", function () {
  10. this.timeout(100000);
  11. it("Should generate the Exponentiation table in k=0", async () => {
  12. const circuit = await wasm_tester(path.join(__dirname, "Multiplier2.circom"));
  13. const w = await circuit.calculateWitness({a: 2, b: 4});
  14. await circuit.checkConstraints(w);
  15. });
  16. });