UNPKG

leap-node

Version:

[![codecov](https://codecov.io/gh/leapdao/leap-node/branch/master/graph/badge.svg)](https://codecov.io/gh/leapdao/leap-node) [![Docker Repository on Quay](https://quay.io/repository/leapdao/leap-node/status "Docker Repository on Quay")](https://quay.io/re

17 lines (13 loc) 572 B
const { Tx } = require('leap-core'); const sendRawTransactionBatch = require('./sendRawTransactionBatch'); const A1 = '0xB8205608d54cb81f44F263bE086027D8610F3C94'; jest.mock('axios'); describe('sendRawTransactionBatch', () => { test('should return number of transactions', async () => { const txs = [Tx.deposit(0, 100, A1, 0)]; const res = await sendRawTransactionBatch(0, txs); // crotch for jest not to complain on setTimeout. TODO: make it better await new Promise(resolve => setTimeout(resolve, 1000)); expect(res).toBe(txs.length); }); });