Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove "sleep" calls as SDK utils handle those #205

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/manage-accounts.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import test from 'tape'
import { wasmGlobalsReady } from '@entropyxyz/sdk'
// @ts-ignore
import { isValidSubstrateAddress } from '@entropyxyz/sdk/utils'
// @ts-ignore
import Keyring from '@entropyxyz/sdk/keys'
import { randomAsHex } from '@polkadot/util-crypto'
import test from 'tape'
// @ts-ignore
import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/testing"
import { EntropyAccountConfig, EntropyConfig } from '../src/config/types'
import { listAccounts } from '../src/flows/manage-accounts/list'
import { createAccount } from '../src/flows/manage-accounts/helpers/create-account'
Expand Down
4 changes: 1 addition & 3 deletions tests/testing-utils/setup-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Keyring from '@entropyxyz/sdk/keys'

import { initializeEntropy } from '../../src/common/initializeEntropy'
import * as config from '../../src/config'
import { makeSeed, promiseRunner, sleep } from './'
import { makeSeed, promiseRunner } from './'

interface SetupTestOpts {
configPath?: string
Expand Down Expand Up @@ -38,8 +38,6 @@ export async function setupTest (t: Test, opts?: SetupTestOpts): Promise<{ entro

await run('config.init', config.init(configPath))

// TODO: remove this after new SDK is published
await sleep(process.env.GITHUB_WORKSPACE ? 30_000 : 5_000)
// To follow the same way we initiate entropy within the cli we must go through the same process of creating an initial keyring
// as done in src/flows/manage-accounts/new-key.ts
const keyring = new Keyring({ seed, debug: true })
Expand Down
2 changes: 0 additions & 2 deletions tests/transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Keyring from '@entropyxyz/sdk/keys'
import {
makeSeed,
promiseRunner,
sleep,
spinNetworkUp,
spinNetworkDown
} from './testing-utils'
Expand All @@ -31,7 +30,6 @@ test('Transfer', async (t) => {
console.error('Error while spinning network down', error.message)
)
})
await sleep(process.env.GITHUB_WORKSPACE ? 30_000 : 5_000)

const naynaySeed = makeSeed()
const naynayKeyring = new Keyring({ seed: naynaySeed, debug: true })
Expand Down
Loading