Skip to content

Commit

Permalink
fixed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh committed May 25, 2021
1 parent cb33359 commit aea699d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ beforeEach(async () => {
builder = new P2WPKHTransactionBuilder(providers.fee, providers.prevout, providers.elliptic)

// Fund 10 DFI TOKEN
await fundEllipticPair(container, providers.ellipticPair, 10)
await providers.setupMocks() // required to move utxos
await utxosToAccount(container, 10, { address: await providers.getAddress() })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ describe('DFI to DOG', () => {
})

it('should poolSwap from DFI to DOG', async () => {
// Fund 10 DFI UTXO
await fundEllipticPair(container, providers.ellipticPair, 10)
// Fund 10 DFI TOKEN
// Fund 100 DFI TOKEN
await providers.setupMocks() // required to move utxos
await utxosToAccount(container, 100, { address: await providers.getAddress() })
// Fund 10 DOG TOKEN
await sendTokensToAddress(container, await providers.getAddress(), 10, 'DOG')

// Fund 10 DFI UTXO
await fundEllipticPair(container, providers.ellipticPair, 10)

// Perform SWAP
const script = await providers.elliptic.script()
const txn = await builder.dex.poolSwap({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ beforeEach(async () => {
builder = new P2WPKHTransactionBuilder(providers.fee, providers.prevout, providers.elliptic)

// Fund 100 DFI TOKEN
await fundEllipticPair(container, providers.ellipticPair, 100)
await providers.setupMocks() // required to move utxos
await utxosToAccount(container, 100, { address: await providers.getAddress() })

Expand Down
6 changes: 3 additions & 3 deletions packages/testcontainers/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ describe('regtest', () => {
})

describe('regtest: override docker image', () => {
const container = new RegTestContainer('defi/defichain:1.6.0')
const container = new TestNetContainer('defi/defichain:1.6.4')

afterAll(async () => {
await container.stop()
})

it('should be able to getmintinginfo and chain should be regtest', async () => {
it('should be able to getmintinginfo and chain should be test', async () => {
await container.start()
await container.waitForReady()
const { chain } = await container.getMintingInfo()
expect(chain).toStrictEqual('regtest')
expect(chain).toStrictEqual('test')
})
})

0 comments on commit aea699d

Please sign in to comment.