Skip to content

Commit

Permalink
style(nodejs): conform to standard rules
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed May 17, 2021
1 parent eac4e70 commit d991c4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wrappers/nodejs/test/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,23 @@ test('ledger', async function (t) {
t.deepEqual(req.operation, { type: '7', timestamp: 123379200 })

// ledgers freeze
var ledgersIds = [0, 3, 76, 874]
let ledgersIds = [0, 3, 76, 874]
req = await indy.buildLedgersFreezeRequest(trusteeDid, ledgersIds)
t.deepEqual(req['operation'], { 'type': '9', 'ledgers_ids': ledgersIds })
t.deepEqual(req.operation, { type: '9', ledgers_ids: ledgersIds })

ledgersIds = []
req = await indy.buildLedgersFreezeRequest(trusteeDid, ledgersIds)
t.deepEqual(req['operation'], { 'type': '9', 'ledgers_ids': ledgersIds })
t.deepEqual(req.operation, { type: '9', ledgers_ids: ledgersIds })

var err = await t.throwsAsync(indy.buildLedgersFreezeRequest(trusteeDid, ['0', '3', '76', '874']))
let err = await t.throwsAsync(indy.buildLedgersFreezeRequest(trusteeDid, ['0', '3', '76', '874']))
t.is(err.indyName, 'CommonInvalidStructure')

err = await t.throwsAsync(indy.buildLedgersFreezeRequest(trusteeDid, '[0, 3, 76, 874]'))
t.is(err.indyName, 'CommonInvalidStructure')

// frozen ledgers
req = await indy.buildGetFrozenLedgersRequest(trusteeDid)
t.deepEqual(req['operation'], { 'type': '10' })
t.deepEqual(req.operation, { type: '10' })

// author agreement acceptance data
req = await indy.appendTxnAuthorAgreementAcceptanceToRequest(req, 'indy agreement', '1.0.0', null, 'acceptance mechanism label 1', 123379200)
Expand Down

0 comments on commit d991c4a

Please sign in to comment.