mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -16,7 +16,7 @@ describe('OrderBook', function() {
|
||||
|
||||
function createRemote() {
|
||||
const remote = new Remote();
|
||||
|
||||
remote._ledger_current_index = 32570;
|
||||
remote.isConnected = function() {
|
||||
return true;
|
||||
};
|
||||
@@ -1605,9 +1605,15 @@ describe('OrderBook', function() {
|
||||
const offer2 = fixtures.transactionWithCreatedOffer();
|
||||
const offer3 = fixtures.transactionWithCreatedOffer();
|
||||
|
||||
remote.emit('ledger_closed', {txn_count: 3});
|
||||
|
||||
book.notify(offer);
|
||||
remote.emit('transaction', offer);
|
||||
book.notify(offer2);
|
||||
remote.emit('transaction', offer2);
|
||||
book.notify(offer3);
|
||||
remote.emit('transaction', offer3);
|
||||
|
||||
|
||||
assert.strictEqual(numTransactionEvents, 3);
|
||||
assert.strictEqual(numOfferAddedEvents, 3);
|
||||
@@ -1698,7 +1704,10 @@ describe('OrderBook', function() {
|
||||
|
||||
const message = fixtures.transactionWithDeletedOffer();
|
||||
|
||||
remote.emit('ledger_closed', {txn_count: 1});
|
||||
|
||||
book.notify(message);
|
||||
remote.emit('transaction', message);
|
||||
|
||||
assert.strictEqual(numTransactionEvents, 1);
|
||||
assert.strictEqual(numTradeEvents, 1);
|
||||
@@ -1857,7 +1866,10 @@ describe('OrderBook', function() {
|
||||
|
||||
const message = fixtures.transactionWithModifiedOffer();
|
||||
|
||||
remote.emit('ledger_closed', {txn_count: 1});
|
||||
|
||||
book.notify(message);
|
||||
remote.emit('transaction', message);
|
||||
|
||||
assert.strictEqual(numTransactionEvents, 1);
|
||||
assert.strictEqual(numTradeEvents, 1);
|
||||
|
||||
Reference in New Issue
Block a user