fix: sequence 0 check, lint and format

This commit is contained in:
Javi
2020-11-06 10:58:21 +01:00
parent 6b4fa159ea
commit 9f6fa6a4fd
65 changed files with 562 additions and 498 deletions

View File

@@ -21,21 +21,21 @@ function checkResult(expected, schemaName, response) {
return response
}
describe('RippleAPIBroadcast', function() {
describe('RippleAPIBroadcast', function () {
this.timeout(TIMEOUT)
beforeEach(setupAPI.setupBroadcast)
afterEach(setupAPI.teardown)
it('base', function() {
it('base', function () {
const expected = {request_server_info: 1}
this.mocks.forEach(mock => mock.expect(_.assign({}, expected)))
this.mocks.forEach((mock) => mock.expect(_.assign({}, expected)))
assert(this.api.isConnected())
return this.api
.getServerInfo()
.then(_.partial(checkResult, responses.getServerInfo, 'getServerInfo'))
})
it('ledger', function(done) {
it('ledger', function (done) {
let gotLedger = 0
this.api.on('ledger', () => {
gotLedger++
@@ -43,7 +43,7 @@ describe('RippleAPIBroadcast', function() {
const ledgerNext = _.assign({}, ledgerClosed)
ledgerNext.ledger_index++
this.api._apis.forEach(api =>
this.api._apis.forEach((api) =>
api.connection
.request({
command: 'echo',
@@ -58,7 +58,7 @@ describe('RippleAPIBroadcast', function() {
}, 1250)
})
it('error propagation', function(done) {
it('error propagation', function (done) {
this.api.once('error', (type, info) => {
assert.strictEqual(type, 'type')
assert.strictEqual(info, 'info')