Skip to content

Commit d572c33

Browse files
committed
improve proofsEnabled DX with env variable
1 parent 9d33cc3 commit d572c33

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/test/approve.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ import {
3737
} from '../examples/side-loaded/program.eg.js';
3838
import { TEST_ERROR_MESSAGES } from './constants.js';
3939

40-
const proofsEnabled = false;
40+
const proofsEnabled = process.env.PROOFS_ENABLED === 'true';
41+
if (!proofsEnabled) {
42+
console.log('Skipping proof generation in approve tests.');
43+
}
4144

4245
describe('Fungible Token - ApproveBase Tests', () => {
4346
let tokenAdmin: Mina.TestPublicKey, tokenA: Mina.TestPublicKey;

src/test/burn.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ import {
3232
} from '../examples/side-loaded/program.eg.js';
3333
import { TEST_ERROR_MESSAGES } from './constants.js';
3434

35-
const proofsEnabled = false;
35+
const proofsEnabled = process.env.PROOFS_ENABLED === 'true';
36+
if (!proofsEnabled) {
37+
console.log('Skipping proof generation in burn tests.');
38+
}
3639

3740
describe('Fungible Token - Burn Tests', () => {
3841
let tokenAdmin: Mina.TestPublicKey, tokenA: Mina.TestPublicKey;

src/test/mint.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ import {
3131
} from '../examples/side-loaded/program.eg.js';
3232
import { TEST_ERROR_MESSAGES } from './constants.js';
3333

34-
const proofsEnabled = false;
34+
const proofsEnabled = process.env.PROOFS_ENABLED === 'true';
35+
if (!proofsEnabled) {
36+
console.log('Skipping proof generation in mint tests.');
37+
}
3538

3639
describe('Fungible Token - Mint Tests', () => {
3740
let tokenAdmin: Mina.TestPublicKey, tokenA: Mina.TestPublicKey;

src/test/transfer.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ import {
3131
} from '../examples/side-loaded/program.eg.js';
3232
import { TEST_ERROR_MESSAGES } from './constants.js';
3333

34-
const proofsEnabled = false;
34+
const proofsEnabled = process.env.PROOFS_ENABLED === 'true';
35+
if (!proofsEnabled) {
36+
console.log('Skipping proof generation in transfer tests.');
37+
}
3538

3639
describe('Fungible Token - Transfer Tests', () => {
3740
let tokenAdmin: Mina.TestPublicKey, tokenA: Mina.TestPublicKey;

0 commit comments

Comments
 (0)