mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2025-02-14 21:10:32 +01:00
fix test
This commit is contained in:
parent
015bf1b07f
commit
072edb054c
@ -68,7 +68,7 @@ test('makeOutput throws TypeError with incorrect amount type', t => {
|
|||||||
|
|
||||||
|
|
||||||
test('Create TRANSFER transaction based on CREATE transaction', t => {
|
test('Create TRANSFER transaction based on CREATE transaction', t => {
|
||||||
sinon.spy(Transaction.makeTransaction)
|
sinon.spy(Transaction, 'makeTransaction')
|
||||||
Transaction.makeTransferTransaction(
|
Transaction.makeTransferTransaction(
|
||||||
[{ tx: createTx, output_index: 0 }],
|
[{ tx: createTx, output_index: 0 }],
|
||||||
[aliceOutput],
|
[aliceOutput],
|
||||||
@ -88,12 +88,12 @@ test('Create TRANSFER transaction based on CREATE transaction', t => {
|
|||||||
// can only mock `makeTransaction.default` with a hack:
|
// can only mock `makeTransaction.default` with a hack:
|
||||||
// See: https://stackoverflow.com/a/33676328/1263876
|
// See: https://stackoverflow.com/a/33676328/1263876
|
||||||
t.truthy(Transaction.makeTransaction.calledWith(...expected))
|
t.truthy(Transaction.makeTransaction.calledWith(...expected))
|
||||||
Transaction.makeTransaction.default.restore()
|
Transaction.makeTransaction.restore()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
test('Create TRANSFER transaction based on TRANSFER transaction', t => {
|
test('Create TRANSFER transaction based on TRANSFER transaction', t => {
|
||||||
sinon.spy(Transaction.makeTransaction, 'default')
|
sinon.spy(Transaction, 'makeTransaction')
|
||||||
|
|
||||||
Transaction.makeTransferTransaction(
|
Transaction.makeTransferTransaction(
|
||||||
[{ tx: transferTx, output_index: 0 }],
|
[{ tx: transferTx, output_index: 0 }],
|
||||||
@ -111,6 +111,6 @@ test('Create TRANSFER transaction based on TRANSFER transaction', t => {
|
|||||||
)]
|
)]
|
||||||
]
|
]
|
||||||
|
|
||||||
t.truthy(Transaction.makeTransaction.default.calledWith(...expected))
|
t.truthy(Transaction.makeTransaction.calledWith(...expected))
|
||||||
Transaction.makeTransaction.default.restore()
|
Transaction.makeTransaction.restore()
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user