From 05a74a46b0b60fd96b3a30a9fee59bfad7862a34 Mon Sep 17 00:00:00 2001 From: mixmix Date: Tue, 22 Oct 2024 13:05:59 +1300 Subject: [PATCH] resolve questions --- tests/faucet.test.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/faucet.test.ts b/tests/faucet.test.ts index bd407bf..64413d2 100644 --- a/tests/faucet.test.ts +++ b/tests/faucet.test.ts @@ -1,5 +1,4 @@ import test from 'tape' -import { Entropy } from '@entropyxyz/sdk' import { readFileSync } from 'fs' import { charlieStashSeed, setupTest } from './testing-utils' @@ -10,15 +9,14 @@ import { EntropyFaucet } from '../src/faucet/main' import { LOCAL_PROGRAM_HASH } from '../src/faucet/utils' import { EntropyAccount } from '../src/account/main' -async function setupAndFundFaucet (t, naynay: Entropy) { +async function setupAndFundFaucet (t) { const { run, entropy: charlie, endpoint } = await setupTest(t, { seed: charlieStashSeed }) - // WARNING: setupTest is getting called twice ... which tries to spin up 2 networks? is this ok? + // NOTE: there is some spin-up-network but it's idempotent! const charlieAddress = charlie.keyring.accounts.registration.address const account = new EntropyAccount(charlie, endpoint) const transfer = new EntropyTransfer(charlie, endpoint) - // NOTE: naynay - const faucet = new EntropyFaucet(naynay, endpoint) // QUESTION: this seems like a mistage + const faucet = new EntropyFaucet(charlie, endpoint) const faucetProgram = readFileSync('tests/programs/faucet_program.wasm') const configurationSchema = { @@ -80,7 +78,7 @@ test('Faucet Tests: Successfully send funds and register', async t => { const faucet = new EntropyFaucet(naynay, endpoint) const balance = new EntropyBalance(naynay, endpoint) - const { faucetAddress, chosenVerifyingKey, faucetProgramPointer } = await setupAndFundFaucet(t, naynay) + const { faucetAddress, chosenVerifyingKey, faucetProgramPointer } = await setupAndFundFaucet(t) let naynayBalance = await balance.getBalance(naynayAddress) t.equal(naynayBalance, 0, 'Naynay is broke af')