-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: removed helpers isDropped, isFailure, isTxDropped, waitForCompletion
- Loading branch information
1 parent
a74c13a
commit b7f3a21
Showing
8 changed files
with
234 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { expect } from 'chai' | ||
import { NodeConnectionFactory } from './NodeConnectionFactory' | ||
import { eth, txUtils } from '../dist' | ||
|
||
describe('Eth tests', () => { | ||
const nodeConnectionFactory = new NodeConnectionFactory() | ||
let provider | ||
|
||
before(() => { | ||
provider = nodeConnectionFactory.createProvider() | ||
return eth.connect({ provider }) | ||
}) | ||
|
||
describe('.getTransactionsByAccount', function() { | ||
it('should return the right amount of txs', async function() { | ||
const account = eth.getAccount() | ||
|
||
const txId = await eth.wallet.sendTransaction({ from: account }) | ||
await txUtils.getConfirmedTransaction(txId) | ||
const txs = await eth.getTransactionsByAccount(account) | ||
expect(txs.length).to.be.equal(1) | ||
|
||
const txId2 = await eth.wallet.sendTransaction({ from: account }) | ||
await txUtils.getConfirmedTransaction(txId2) | ||
const txs2 = await eth.getTransactionsByAccount(account) | ||
expect(txs2.length).to.be.equal(2) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.