From 72bc83ce283ad288eba8cce16ae9898f5ddd57f0 Mon Sep 17 00:00:00 2001 From: Nodari Chkuaselidze Date: Sat, 6 Nov 2021 18:26:14 +0400 Subject: [PATCH] test: clean up eslint configs. --- .eslintrc.json | 3 ++- test/address-test.js | 3 --- test/airdrop-test.js | 4 ---- test/anyone-can-renew-test.js | 3 --- test/auction-reorg-test.js | 4 ---- test/auction-rpc-test.js | 3 --- test/auction-test.js | 4 ---- test/block-test.js | 4 ---- test/blockstore-test.js | 10 ---------- test/brontide-test.js | 3 --- test/chain-bip9-test.js | 3 --- test/chain-checkpoints-test.js | 3 --- test/chain-locktime-test.js | 3 --- test/chain-migration-test.js | 3 --- test/chain-prune-test.js | 3 --- test/chain-test.js | 3 --- test/claim-test.js | 4 ---- test/coin-test.js | 4 ---- test/coins-test.js | 4 ---- test/consensus-test.js | 3 --- test/contractstate-test.js | 2 -- test/disable-goosig-test.js | 9 --------- test/dns-test.js | 3 --- test/getwork-test.js | 3 --- test/hd-test.js | 3 --- test/headers-test.js | 3 --- test/http-test.js | 3 --- test/input-test.js | 4 ---- test/interactive-swap-test.js | 3 --- test/invalid-reorg-test.js | 3 --- test/keyring-test.js | 11 ----------- test/mempool-test.js | 3 --- test/migrations-test.js | 3 --- test/miner-test.js | 2 -- test/mnemonic-test.js | 3 --- test/mtx-test.js | 6 ------ test/net-test.js | 3 --- test/node-http-test.js | 10 ---------- test/node-rpc-test.js | 9 --------- test/path-test.js | 4 ---- test/script-introspection-test.js | 3 --- test/script-test.js | 3 --- test/sighash-test.js | 6 ------ test/slidingwindow-test.js | 3 --- test/tx-test.js | 3 --- test/txmeta-test.js | 3 --- test/txstart-test.js | 3 --- test/utils-test.js | 3 --- test/wallet-accounts-auction-test.js | 3 --- test/wallet-auction-test.js | 4 ---- test/wallet-change-test.js | 3 --- test/wallet-deepclean-test.js | 3 --- test/wallet-http-test.js | 10 ---------- test/wallet-importname-test.js | 3 --- test/wallet-migration-test.js | 3 --- test/wallet-rescan-test.js | 4 ---- test/wallet-rpc-test.js | 2 -- test/wallet-test.js | 8 ++------ 58 files changed, 4 insertions(+), 230 deletions(-) delete mode 100644 test/keyring-test.js diff --git a/.eslintrc.json b/.eslintrc.json index 4db51ca1..3de38b42 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -39,7 +39,8 @@ }, "rules": { "max-len": "off", - "prefer-arrow-callback": "off" + "prefer-arrow-callback": "off", + "no-return-assign": "off" } } ], diff --git a/test/address-test.js b/test/address-test.js index 59c0449b..252f39e3 100644 --- a/test/address-test.js +++ b/test/address-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/airdrop-test.js b/test/airdrop-test.js index d8d3e028..841002bd 100644 --- a/test/airdrop-test.js +++ b/test/airdrop-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - 'use strict'; const fs = require('fs'); diff --git a/test/anyone-can-renew-test.js b/test/anyone-can-renew-test.js index cf912f11..76fa0149 100644 --- a/test/anyone-can-renew-test.js +++ b/test/anyone-can-renew-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/auction-reorg-test.js b/test/auction-reorg-test.js index 0cc23e2b..2c9858c1 100644 --- a/test/auction-reorg-test.js +++ b/test/auction-reorg-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - // DO NOT TOUCH THESE TESTS // They trigger the tree interval reorg bug. diff --git a/test/auction-rpc-test.js b/test/auction-rpc-test.js index 0c2a98f9..7eaf4635 100644 --- a/test/auction-rpc-test.js +++ b/test/auction-rpc-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/auction-test.js b/test/auction-test.js index 1981a2a9..cd33abbe 100644 --- a/test/auction-test.js +++ b/test/auction-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/block-test.js b/test/block-test.js index 2abc381d..0ca47d8a 100644 --- a/test/block-test.js +++ b/test/block-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/blockstore-test.js b/test/blockstore-test.js index 968e2697..d12ce0c4 100644 --- a/test/blockstore-test.js +++ b/test/blockstore-test.js @@ -1,13 +1,3 @@ -/** - * test/blockstore-test.js - blockstore test for hsd - * Copyright (c) 2019, Braydon Fuller (MIT License). - * Copyright (c) 2019, Mark Tyneway (MIT License). - * https://github.com/handshake-org/hsd - */ - -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const Logger = require('blgr'); diff --git a/test/brontide-test.js b/test/brontide-test.js index 2ea59aaa..c14ee7ab 100644 --- a/test/brontide-test.js +++ b/test/brontide-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('assert'); diff --git a/test/chain-bip9-test.js b/test/chain-bip9-test.js index c956dba0..c0d8a830 100644 --- a/test/chain-bip9-test.js +++ b/test/chain-bip9-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/chain-checkpoints-test.js b/test/chain-checkpoints-test.js index cc4b5aac..19977396 100644 --- a/test/chain-checkpoints-test.js +++ b/test/chain-checkpoints-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/chain-locktime-test.js b/test/chain-locktime-test.js index 2a760723..ae8b0ea1 100644 --- a/test/chain-locktime-test.js +++ b/test/chain-locktime-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/chain-migration-test.js b/test/chain-migration-test.js index 49266ee9..17963d0d 100644 --- a/test/chain-migration-test.js +++ b/test/chain-migration-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/chain-prune-test.js b/test/chain-prune-test.js index ad5816bd..7043903c 100644 --- a/test/chain-prune-test.js +++ b/test/chain-prune-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/chain-test.js b/test/chain-test.js index 6b393c53..c6bca449 100644 --- a/test/chain-test.js +++ b/test/chain-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/claim-test.js b/test/claim-test.js index 84457ccd..2032cace 100644 --- a/test/claim-test.js +++ b/test/claim-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-implicit-coercion: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/coin-test.js b/test/coin-test.js index 0bd7d21b..b0c20a2d 100644 --- a/test/coin-test.js +++ b/test/coin-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const {BufferWriter} = require('bufio'); diff --git a/test/coins-test.js b/test/coins-test.js index 240d3eb2..516a7e61 100644 --- a/test/coins-test.js +++ b/test/coins-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/consensus-test.js b/test/consensus-test.js index 33b99680..82e9e57b 100644 --- a/test/consensus-test.js +++ b/test/consensus-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/contractstate-test.js b/test/contractstate-test.js index 668d8f0c..3dbd6540 100644 --- a/test/contractstate-test.js +++ b/test/contractstate-test.js @@ -1,5 +1,3 @@ -/* eslint-env mocha */ - 'use strict'; const assert = require('bsert'); diff --git a/test/disable-goosig-test.js b/test/disable-goosig-test.js index 15fd3eb3..58674560 100644 --- a/test/disable-goosig-test.js +++ b/test/disable-goosig-test.js @@ -1,12 +1,3 @@ -/** - * test/disable-goosig-test.js - Test disabling GooSig - * Copyright (c) 2020, The Handshake Developers (MIT License). - * https://github.com/handshake-org/hsd - */ - -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/dns-test.js b/test/dns-test.js index 71aaef99..dfb762d6 100644 --- a/test/dns-test.js +++ b/test/dns-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/getwork-test.js b/test/getwork-test.js index e74f4bbe..214a205b 100644 --- a/test/getwork-test.js +++ b/test/getwork-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/hd-test.js b/test/hd-test.js index 9d636a98..0fa144a1 100644 --- a/test/hd-test.js +++ b/test/hd-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const base58 = require('bcrypto/lib/encoding/base58'); diff --git a/test/headers-test.js b/test/headers-test.js index ffb031d8..d62c083d 100644 --- a/test/headers-test.js +++ b/test/headers-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const Headers = require('../lib/primitives/headers'); diff --git a/test/http-test.js b/test/http-test.js index 453b1209..b5c6a978 100644 --- a/test/http-test.js +++ b/test/http-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/input-test.js b/test/input-test.js index f8110edf..6cccd0bc 100644 --- a/test/input-test.js +++ b/test/input-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/interactive-swap-test.js b/test/interactive-swap-test.js index 0510ba2c..0fdbaf83 100644 --- a/test/interactive-swap-test.js +++ b/test/interactive-swap-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/invalid-reorg-test.js b/test/invalid-reorg-test.js index fa58ee22..e7bb99cb 100644 --- a/test/invalid-reorg-test.js +++ b/test/invalid-reorg-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/keyring-test.js b/test/keyring-test.js deleted file mode 100644 index 463a35b8..00000000 --- a/test/keyring-test.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - -'use strict'; - -const assert = require('bsert'); -const KeyRing = require('../lib/primitives/keyring'); - -describe('KeyRing', function() { -}); diff --git a/test/mempool-test.js b/test/mempool-test.js index 10d9dc4b..393a24b4 100644 --- a/test/mempool-test.js +++ b/test/mempool-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/migrations-test.js b/test/migrations-test.js index 1583a6db..437dc41b 100644 --- a/test/migrations-test.js +++ b/test/migrations-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/miner-test.js b/test/miner-test.js index 0a8d2882..d7388f97 100644 --- a/test/miner-test.js +++ b/test/miner-test.js @@ -1,5 +1,3 @@ -/* eslint-env mocha */ - 'use strict'; const assert = require('bsert'); diff --git a/test/mnemonic-test.js b/test/mnemonic-test.js index b0e670df..1bc8cee8 100644 --- a/test/mnemonic-test.js +++ b/test/mnemonic-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/mtx-test.js b/test/mtx-test.js index e5dd39ae..7ff108cb 100644 --- a/test/mtx-test.js +++ b/test/mtx-test.js @@ -1,16 +1,10 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const assert = require('bsert'); -const bio = require('bufio'); const CoinView = require('../lib/coins/coinview'); const WalletCoinView = require('../lib/wallet/walletcoinview'); const MTX = require('../lib/primitives/mtx'); const Path = require('../lib/wallet/path'); -const common = require('./util/common'); const mtx1json = require('./data/mtx1.json'); const mtx2json = require('./data/mtx2.json'); diff --git a/test/net-test.js b/test/net-test.js index 8af0ba94..67f4c744 100644 --- a/test/net-test.js +++ b/test/net-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/node-http-test.js b/test/node-http-test.js index 88fbad59..4feda80c 100644 --- a/test/node-http-test.js +++ b/test/node-http-test.js @@ -1,13 +1,3 @@ -/*! - * test/node-http-test.js - test for wallet http endoints - * Copyright (c) 2019, Mark Tyneway (MIT License). - * https://github.com/handshake-org/hsd - */ - -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/node-rpc-test.js b/test/node-rpc-test.js index 961072e2..9b3e92e5 100644 --- a/test/node-rpc-test.js +++ b/test/node-rpc-test.js @@ -1,12 +1,3 @@ -/** - * test/node-rpc-test.js - Node RPC tests for hsd - * Copyright (c) 2020, The Handshake Developers (MIT Licence) - * https://github.com/handshake-org/hsd - */ - -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/path-test.js b/test/path-test.js index 7098c2d2..32c68976 100644 --- a/test/path-test.js +++ b/test/path-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-unused-vars: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/script-introspection-test.js b/test/script-introspection-test.js index 908ca250..47e003db 100644 --- a/test/script-introspection-test.js +++ b/test/script-introspection-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/script-test.js b/test/script-test.js index 5ff9baec..65853eb1 100644 --- a/test/script-test.js +++ b/test/script-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/sighash-test.js b/test/sighash-test.js index dcc69704..b130577d 100644 --- a/test/sighash-test.js +++ b/test/sighash-test.js @@ -1,9 +1,3 @@ -/*! - * sighash-test.js - test sighash types - * Copyright (c) 2019, Mark Tyneway (MIT License). - * https://github.com/handshake-org/hsd - */ - 'use strict'; const assert = require('bsert'); diff --git a/test/slidingwindow-test.js b/test/slidingwindow-test.js index d104ad22..67a203b6 100644 --- a/test/slidingwindow-test.js +++ b/test/slidingwindow-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/tx-test.js b/test/tx-test.js index f69c459b..c11e5a51 100644 --- a/test/tx-test.js +++ b/test/tx-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const {encoding} = require('bufio'); diff --git a/test/txmeta-test.js b/test/txmeta-test.js index dc2d397b..4d643cc8 100644 --- a/test/txmeta-test.js +++ b/test/txmeta-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/txstart-test.js b/test/txstart-test.js index 5855ab6d..e458de6c 100644 --- a/test/txstart-test.js +++ b/test/txstart-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/utils-test.js b/test/utils-test.js index eea28055..22dd20ad 100644 --- a/test/utils-test.js +++ b/test/utils-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-accounts-auction-test.js b/test/wallet-accounts-auction-test.js index 34515512..bee72000 100644 --- a/test/wallet-accounts-auction-test.js +++ b/test/wallet-accounts-auction-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-auction-test.js b/test/wallet-auction-test.js index fd25a568..e385a5dc 100644 --- a/test/wallet-auction-test.js +++ b/test/wallet-auction-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-change-test.js b/test/wallet-change-test.js index 5216ea0d..b423d1a7 100644 --- a/test/wallet-change-test.js +++ b/test/wallet-change-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-deepclean-test.js b/test/wallet-deepclean-test.js index 3b890d5e..e2508d26 100644 --- a/test/wallet-deepclean-test.js +++ b/test/wallet-deepclean-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-http-test.js b/test/wallet-http-test.js index 51ed107e..a9f77e5a 100644 --- a/test/wallet-http-test.js +++ b/test/wallet-http-test.js @@ -1,13 +1,3 @@ -/*! - * test/wallet-http-test.js - test for wallet http endoints - * Copyright (c) 2019, Mark Tyneway (MIT License). - * https://github.com/handshake-org/hsd - */ - -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-return-assign: "off" */ - 'use strict'; const {NodeClient, WalletClient} = require('hs-client'); diff --git a/test/wallet-importname-test.js b/test/wallet-importname-test.js index 7b7b168c..0322f9e9 100644 --- a/test/wallet-importname-test.js +++ b/test/wallet-importname-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-migration-test.js b/test/wallet-migration-test.js index e6e36b4e..7fd5080a 100644 --- a/test/wallet-migration-test.js +++ b/test/wallet-migration-test.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-rescan-test.js b/test/wallet-rescan-test.js index fc7ea44b..283116ff 100644 --- a/test/wallet-rescan-test.js +++ b/test/wallet-rescan-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-implicit-coercion: "off" */ - 'use strict'; const assert = require('bsert'); diff --git a/test/wallet-rpc-test.js b/test/wallet-rpc-test.js index 3721fa93..2131ee73 100644 --- a/test/wallet-rpc-test.js +++ b/test/wallet-rpc-test.js @@ -1,5 +1,3 @@ -/* eslint-env mocha */ - 'use strict'; const {NodeClient,WalletClient} = require('hs-client'); diff --git a/test/wallet-test.js b/test/wallet-test.js index 31bfa0eb..3e7aa22b 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -1,7 +1,3 @@ -/* eslint-env mocha */ -/* eslint prefer-arrow-callback: "off" */ -/* eslint no-implicit-coercion: "off" */ - 'use strict'; const assert = require('bsert'); @@ -2463,8 +2459,8 @@ describe('Wallet', function() { let bal = await wallet.getBalance(); assert.strictEqual(bal.tx, 2); assert.strictEqual(bal.coin, 2); - assert.strictEqual(bal.confirmed, 10e6 - (1 * fee)); - assert.strictEqual(bal.unconfirmed, 10e6 - (1 * fee)); + assert.strictEqual(bal.confirmed, 10e6 - (cTXCount * fee)); + assert.strictEqual(bal.unconfirmed, 10e6 - (uTXCount * fee)); assert.strictEqual(bal.ulocked, 0); assert.strictEqual(bal.clocked, 0);