getDecoratedOutput and assertOut errors
Opened this issue · 4 comments
I am trying to test my circom circuit but am getting errors.
Generating the witness using let witness = await circuit.calculateWitness({ a: inputA, b: inputB });
works as expected.
Then I am trying these two functions but I get errors:
await circuit.getDecoratedOutput(witness)
gives ReferenceError: utils is not defined
and
await circuit.assertOut(witness, expectedOutput)
gives AssertionError: Output variable not defined: main[0]
I have no idea what this means and how to fix it. Does someone have any idea?
getting the same issue re: utils not being defined.
it's coming from the following line in the autogenerated /wasm/tester.js file:
if (utils.isDefined(witness[self.symbols[n].varIdx])) {
with utils
obviously being undefined.
just modify that line to
if (witness[self.symbols[n].varIdx] !== undefined)
in node_modules/circom_tester/wasm/tester.js