Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): bump noir compile tests #8705

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 38 additions & 26 deletions noir/noir-repo/compiler/wasm/test/compiler/node/compile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,42 @@ import { shouldCompileContractIdentically, shouldCompileProgramIdentically } fro
const basePath = resolve(join(__dirname, '../../'));

describe('noir-compiler/node', () => {
shouldCompileProgramIdentically(async () => {
const { simpleScriptProjectPath, simpleScriptExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(simpleScriptProjectPath);
const nargoArtifact = JSON.parse((await readFile(simpleScriptExpectedArtifact)).toString()) as ProgramArtifact;
const noirWasmArtifact = await compile_program(fm);
return { nargoArtifact, noirWasmArtifact };
}, expect);

shouldCompileProgramIdentically(async () => {
const { depsScriptProjectPath, depsScriptExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(depsScriptProjectPath);
const nargoArtifact = JSON.parse((await readFile(depsScriptExpectedArtifact)).toString()) as ProgramArtifact;
const noirWasmArtifact = await compile_program(fm);
return { nargoArtifact, noirWasmArtifact };
}, expect);

shouldCompileContractIdentically(async () => {
const { contractProjectPath, contractExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(contractProjectPath);
const nargoArtifact = JSON.parse((await readFile(contractExpectedArtifact)).toString()) as ContractArtifact;
const noirWasmArtifact = await compile_contract(fm);
return { nargoArtifact, noirWasmArtifact };
}, expect);
shouldCompileProgramIdentically(
async () => {
const { simpleScriptProjectPath, simpleScriptExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(simpleScriptProjectPath);
const nargoArtifact = JSON.parse((await readFile(simpleScriptExpectedArtifact)).toString()) as ProgramArtifact;
const noirWasmArtifact = await compile_program(fm);
return { nargoArtifact, noirWasmArtifact };
},
expect,
/*30 second timeout*/ 30000,
);

shouldCompileProgramIdentically(
async () => {
const { depsScriptProjectPath, depsScriptExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(depsScriptProjectPath);
const nargoArtifact = JSON.parse((await readFile(depsScriptExpectedArtifact)).toString()) as ProgramArtifact;
const noirWasmArtifact = await compile_program(fm);
return { nargoArtifact, noirWasmArtifact };
},
expect,
/*30 second timeout*/ 30000,
);

shouldCompileContractIdentically(
async () => {
const { contractProjectPath, contractExpectedArtifact } = getPaths(basePath);

const fm = createFileManager(contractProjectPath);
const nargoArtifact = JSON.parse((await readFile(contractExpectedArtifact)).toString()) as ContractArtifact;
const noirWasmArtifact = await compile_contract(fm);
return { nargoArtifact, noirWasmArtifact };
},
expect,
/*30 second timeout*/ 30000,
);
});
Loading