diff --git a/test/integration/contract.js b/test/integration/contract.js index 138164a62d..f660d880ef 100644 --- a/test/integration/contract.js +++ b/test/integration/contract.js @@ -191,7 +191,7 @@ describe('Contract', function () { let deployed before(async function () { - contract = await ready(this, true, true) + contract = await ready(this, true) }) describe('Aens and Oracle operation delegation', () => { let cInstance diff --git a/test/integration/index.js b/test/integration/index.js index 7c9618572b..ff19b8100d 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -15,13 +15,11 @@ * PERFORMANCE OF THIS SOFTWARE. */ -import { Universal as Ae } from '../../es/ae/universal' -import * as Crypto from '../../es/utils/crypto' +import { Universal, Crypto, MemoryAccount, Node } from '../../es' import { BigNumber } from 'bignumber.js' -import MemoryAccount from '../../es/account/memory' -import Node from '../../es/node' import chai from 'chai' import chaiAsPromised from 'chai-as-promised' + chai.use(chaiAsPromised) chai.should() @@ -29,10 +27,10 @@ export const url = process.env.TEST_URL || 'http://localhost:3013' export const internalUrl = process.env.TEST_INTERNAL_URL || 'http://localhost:3113' export const compilerUrl = process.env.COMPILER_URL || 'http://localhost:3080' export const networkId = process.env.TEST_NETWORK_ID || 'ae_devnet' -export const forceCompatibility = process.env.FORCE_COMPATIBILITY || false +const forceCompatibility = process.env.FORCE_COMPATIBILITY || false export const account = Crypto.generateKeyPair() -export const BaseAe = async (params) => Ae.waitMined(true).compose({ +export const BaseAe = async (params) => Universal.waitMined(true).compose({ deepProps: { Swagger: { defaults: { debug: !!process.env['DEBUG'] } } }, props: { process, compilerUrl } })({ @@ -48,13 +46,11 @@ export function plan (amount) { planned = planned.plus(amount) } -export const TIMEOUT = 18000000 - export function configure (mocha) { - mocha.timeout(TIMEOUT) + mocha.timeout(18000000) } -export async function ready (mocha, native = true, withAccounts = false) { +export async function ready (mocha, nativeMode = true) { configure(mocha) const ae = await BaseAe({ networkId }) @@ -69,17 +65,7 @@ export async function ready (mocha, native = true, withAccounts = false) { return BaseAe({ accounts: [MemoryAccount({ keypair: account })], address: account.publicKey, - nativeMode: native, + nativeMode, networkId }) } - -export default { - BaseAe, - url, - internalUrl, - networkId, - configure, - ready, - plan, -}