Skip to content

Commit

Permalink
use testing package for container creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kodemon committed Jan 12, 2022
1 parent c802e5b commit add7b3a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Testing } from '@defichain/jellyfish-testing'
import { MasterNodeRegTestContainer, RegTestContainer } from '@defichain/testcontainers'
import { ContainerAdapterClient } from '../../container_adapter_client'

Expand All @@ -20,19 +21,18 @@ describe('Wallet without masternode', () => {
})

describe('Wallet with masternode', () => {
const container = new MasterNodeRegTestContainer()
const client = new ContainerAdapterClient(container)
const { container, rpc: { wallet } } = Testing.create(new MasterNodeRegTestContainer())

beforeAll(async () => {
await container.start()
await client.wallet.createWallet('test')
await wallet.createWallet('test')
})

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

it('should listWallets', async () => {
await expect(client.wallet.listWallets()).resolves.toEqual(['', 'test'])
await expect(wallet.listWallets()).resolves.toEqual(['', 'test'])
})
})

0 comments on commit add7b3a

Please sign in to comment.