Skip to content

Commit

Permalink
Refactor integration/index
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jun 20, 2020
1 parent fad90a6 commit 3d9ea85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/integration/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 4 additions & 16 deletions test/integration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ 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({
Expand All @@ -48,13 +48,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 })
Expand All @@ -69,17 +67,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,
}

0 comments on commit 3d9ea85

Please sign in to comment.