sed -i 's/ var / const /', with const->let fixes
This commit is contained in:
parent
91b8823aa8
commit
a5db0a4e44
46 changed files with 776 additions and 769 deletions
|
@ -23,7 +23,7 @@ describe('Script Signatures', function () {
|
|||
describe('encode', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('encodes ' + f.hex, function () {
|
||||
var buffer = bscriptSig.encode(fromRaw(f.raw), f.hashType)
|
||||
const buffer = bscriptSig.encode(fromRaw(f.raw), f.hashType)
|
||||
|
||||
assert.strictEqual(buffer.toString('hex'), f.hex)
|
||||
})
|
||||
|
@ -33,7 +33,7 @@ describe('Script Signatures', function () {
|
|||
if (!f.raw) return
|
||||
|
||||
it('throws ' + f.exception, function () {
|
||||
var signature = fromRaw(f.raw)
|
||||
const signature = fromRaw(f.raw)
|
||||
|
||||
assert.throws(function () {
|
||||
bscriptSig.encode(signature, f.hashType)
|
||||
|
@ -45,7 +45,7 @@ describe('Script Signatures', function () {
|
|||
describe('decode', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('decodes ' + f.hex, function () {
|
||||
var decode = bscriptSig.decode(Buffer.from(f.hex, 'hex'))
|
||||
const decode = bscriptSig.decode(Buffer.from(f.hex, 'hex'))
|
||||
|
||||
assert.deepEqual(toRaw(decode.signature), f.raw)
|
||||
assert.strictEqual(decode.hashType, f.hashType)
|
||||
|
@ -54,7 +54,7 @@ describe('Script Signatures', function () {
|
|||
|
||||
fixtures.invalid.forEach(function (f) {
|
||||
it('throws on ' + f.hex, function () {
|
||||
var buffer = Buffer.from(f.hex, 'hex')
|
||||
const buffer = Buffer.from(f.hex, 'hex')
|
||||
|
||||
assert.throws(function () {
|
||||
bscriptSig.decode(buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue