Skip to content

Commit

Permalink
chore: delete duplicated test (#6113)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

It looks like we picked up an extra copy of some tests in this file at
some point (most likely a sync)

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Sep 20, 2024
1 parent 73245b3 commit ad83302
Showing 1 changed file with 5 additions and 35 deletions.
40 changes: 5 additions & 35 deletions tooling/noir_js/test/node/execute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,20 @@ it('executes a single-ACIR program correctly', async () => {
expect(returnValue).to.be.eq('0x05');
});

it('circuit with a fmt string assert message should fail with the resolved assertion message', async () => {
it('successfully executes a program with multiple acir circuits', async () => {
const inputs = {
x: '10',
y: '5',
};
try {
await new Noir(assert_msg_runtime).execute(inputs);
} catch (error) {
const knownError = error as Error;
expect(knownError.message).to.equal('Circuit execution failed: Expected x < y but got 10 < 5');
}
});

it('circuit with a raw assert payload should fail with the decoded payload', async () => {
const inputs = {
x: '7',
y: '5',
};
try {
await new Noir(assert_raw_payload_json).execute(inputs);
} catch (error) {
const knownError = error as ErrorWithPayload;
const invalidXYErrorSelector = Object.keys(assert_raw_payload_json.abi.error_types)[0];
expect(knownError.rawAssertionPayload!.selector).to.equal(invalidXYErrorSelector);
expect(knownError.decodedAssertionPayload).to.deep.equal({
x: '0x07',
y: '0x05',
});
}
expect(() => new Noir(fold_fibonacci_program).execute(inputs)).to.not.throw();
});

it('successfully executes a program with multiple acir circuits', async () => {
it('circuit with a fmt string assert message should fail with the resolved assertion message', async () => {
const inputs = {
x: '10',
y: '5',
};
try {
await new Noir(fold_fibonacci_program).execute(inputs);
await new Noir(assert_msg_runtime).execute(inputs);
} catch (error) {
const knownError = error as Error;
expect(knownError.message).to.equal('Circuit execution failed: Expected x < y but got 10 < 5');
Expand All @@ -84,13 +61,6 @@ it('circuit with a raw assert payload should fail with the decoded payload', asy
}
});

it('successfully executes a program with multiple acir circuits', async () => {
const inputs = {
x: '10',
};
expect(() => new Noir(fold_fibonacci_program).execute(inputs)).to.not.throw();
});

it('successfully decodes the return values from a program using the databus', async () => {
const inputs = {
x: '3',
Expand Down

0 comments on commit ad83302

Please sign in to comment.