Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 5faec96

Browse files
committed
Add integration test for store.pendingBalanceSatoshis
1 parent a7c644b commit 5faec96

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/integration/action/action-integration.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ describe('Action Integration Tests', function() {
273273
expect(store2.balanceSatoshis, 'to be positive');
274274
expect(store1.channelBalanceSatoshis, 'to be', 0);
275275
expect(store2.channelBalanceSatoshis, 'to be', 0);
276+
expect(store1.pendingBalanceSatoshis, 'to be', 0);
277+
expect(store2.pendingBalanceSatoshis, 'to be', 0);
276278
});
277279
});
278280

@@ -305,6 +307,14 @@ describe('Action Integration Tests', function() {
305307
expect(store1.computedChannels[0].status, 'to be', 'pending-open');
306308
});
307309

310+
it('should have enough satoshis in channel balance', async () => {
311+
await updateBalances();
312+
expect(store1.pendingBalanceSatoshis, 'to be positive');
313+
expect(store2.pendingBalanceSatoshis, 'to be', 0);
314+
expect(store1.channelBalanceSatoshis, 'to be', 0);
315+
expect(store2.channelBalanceSatoshis, 'to be', 0);
316+
});
317+
308318
it('should list open channel after mining 6 blocks', async () => {
309319
await mineAndSync({ blocks: 6 });
310320
while (store1.pendingChannels.length) await nap(100);
@@ -315,6 +325,8 @@ describe('Action Integration Tests', function() {
315325

316326
it('should have enough satoshis in channel balance', async () => {
317327
await updateBalances();
328+
expect(store1.pendingBalanceSatoshis, 'to be', 0);
329+
expect(store2.pendingBalanceSatoshis, 'to be', 0);
318330
expect(store1.channelBalanceSatoshis, 'to be positive');
319331
expect(store2.channelBalanceSatoshis, 'to be', 0);
320332
});

0 commit comments

Comments
 (0)