fix: stabilize tests

This commit is contained in:
Michael Vines
2018-11-16 19:29:14 -08:00
parent 44047a8d63
commit 921ae797d8
2 changed files with 5 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import {mockRpc, mockRpcEnabled} from './__mocks__/node-fetch';
import {url} from './url';
import {newAccountWithTokens} from './new-account-with-tokens';
import {mockGetLastId} from './mockrpc/getlastid';
import {sleep} from '../src/util/sleep';
if (!mockRpcEnabled) {
// The default of 5 seconds is too slow for live testing sometimes
@@ -546,6 +547,8 @@ test('transfer', async () => {
]);
}
await sleep(500);
const destAccountInfo = await testToken.accountInfo(dest);
expect(destAccountInfo.amount.toNumber()).toBe(123);
});