Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Sep 8, 2023
1 parent dcbf67e commit 4e8bc87
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions yarn-project/end-to-end/src/cli_docs_sandbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ View result: 1000000n

clearLogs();

// We reset CLI so that we can call the same command again later on
resetCli();

// Test send
docs = `
// docs:start:send
Expand Down Expand Up @@ -361,24 +364,25 @@ View result: 543n
.replace('$ADDRESS', newAddress.toString())
.replace('$CONTRACT_ADDRESS', contractAddress.toString());

// await run(command);
await run(command);

foundBalance = findInLogs(/View\sresult:\s+(?<data>\S+)/)?.groups?.data;
// expect(foundBalance!).toEqual(`${BigInt(999457).toString()}n`);
expect(foundBalance!).toEqual(`${BigInt(999457).toString()}n`);

// clearLogs();
clearLogs();
resetCli();

// command = docs
// .split('\n')[6]
// .split('aztec-cli ')[1]
// .replace('$ADDRESS2', address2.toString())
// .replace('$CONTRACT_ADDRESS', contractAddress.toString());
command = docs
.split('\n')[6]
.split('aztec-cli ')[1]
.replace('$ADDRESS2', address2.toString())
.replace('$CONTRACT_ADDRESS', contractAddress.toString());

// await run(command);
await run(command);

// foundBalance = findInLogs(/View\sresult:\s+(?<data>\S+)/)?.groups?.data;
// expect(foundBalance!).toEqual(`${BigInt(543).toString()}n`);
foundBalance = findInLogs(/View\sresult:\s+(?<data>\S+)/)?.groups?.data;
expect(foundBalance!).toEqual(`${BigInt(543).toString()}n`);

// clearLogs();
clearLogs();
}, 60_000);
});

0 comments on commit 4e8bc87

Please sign in to comment.