Skip to content

Commit

Permalink
remove duplicate test about c witness
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Jan 24, 2024
1 parent 219cc39 commit 2f8fc3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
13 changes: 0 additions & 13 deletions tests/circomkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ forEach(PROTOCOLS).describe('protocol: %s', (protocol: (typeof PROTOCOLS)[number
expect(existsSync(`${outPath}/${CIRCUIT_NAME}_cpp`)).to.be.false;
});

it('should compile circuit and generate the c witness calculator files', async () => {
const circomKitCWitness = new Circomkit({
protocol,
verbose: false,
logLevel: 'silent',
cWitness: true,
});
const outPath = await circomKitCWitness.compile(CIRCUIT_NAME);
expect(existsSync(`${outPath}/${CIRCUIT_NAME}_cpp`)).to.be.true;
// remove it to prevent the next proof system run to fail
rmSync(`${outPath}/${CIRCUIT_NAME}_cpp`, {recursive: true});
});

it('should export circuit information', async () => {
await circomkit.info(CIRCUIT_NAME);
});
Expand Down
4 changes: 3 additions & 1 deletion tests/configs.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {expect} from 'chai';
import {Circomkit} from '../src';
import forEach from 'mocha-each';
import {existsSync} from 'fs';
import {existsSync, rmSync} from 'fs';

describe('circomkit config overrides', () => {
it('should override default configs', () => {
Expand Down Expand Up @@ -128,5 +128,7 @@ describe('generating C witness', () => {
const circomKitCWitness = new Circomkit({...CONFIG, cWitness: true});
const outPath = await circomKitCWitness.compile(CIRCUIT_NAME);
expect(existsSync(`${outPath}/${CIRCUIT_NAME}_cpp`)).to.be.true;

rmSync(`${outPath}/${CIRCUIT_NAME}_cpp`, {recursive: true});
});
});

0 comments on commit 2f8fc3f

Please sign in to comment.