Skip to content

Commit

Permalink
Allow (and document) running tests without proof generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kantp committed Jun 21, 2024
1 parent a1912af commit ebbc088
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FungibleToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
FungibleTokenAdminDeployProps,
} from "./index.js"

const proofsEnabled = process.argv.indexOf("--proofs-disabled") === -1
const proofsEnabled = process.env.SKIP_PROOFS !== "true"
if (!proofsEnabled) console.log("Skipping proof generation in tests.")

const localChain = await Mina.LocalBlockchain({
proofsEnabled,
Expand All @@ -32,7 +33,7 @@ const localChain = await Mina.LocalBlockchain({
Mina.setActiveInstance(localChain)

describe("token integration", async () => {
if (proofsEnabled) {
{
await FungibleToken.compile()
await ThirdParty.compile()
await FungibleTokenAdmin.compile()
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ awaiting an audit of the code before removing the beta status.
npm run test
```

If you want disable proof generation during testing, you can do so via

```sh
SKIP_PROOFS=true npm run test
```

The tests will run much faster that way, which is nice when you're testing locally while developing.
Note that this will skip one test does

## Running [Examples](./examples)

```sh
Expand Down

0 comments on commit ebbc088

Please sign in to comment.