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
test
|
@ -9,8 +9,8 @@ describe('bufferutils', function () {
|
|||
describe('readUInt64LE', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('decodes ' + f.hex, function () {
|
||||
var buffer = Buffer.from(f.hex, 'hex')
|
||||
var number = bufferutils.readUInt64LE(buffer, 0)
|
||||
const buffer = Buffer.from(f.hex, 'hex')
|
||||
const number = bufferutils.readUInt64LE(buffer, 0)
|
||||
|
||||
assert.strictEqual(number, f.dec)
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ describe('bufferutils', function () {
|
|||
|
||||
fixtures.invalid.readUInt64LE.forEach(function (f) {
|
||||
it('throws on ' + f.description, function () {
|
||||
var buffer = Buffer.from(f.hex, 'hex')
|
||||
const buffer = Buffer.from(f.hex, 'hex')
|
||||
|
||||
assert.throws(function () {
|
||||
bufferutils.readUInt64LE(buffer, 0)
|
||||
|
@ -30,7 +30,7 @@ describe('bufferutils', function () {
|
|||
describe('writeUInt64LE', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('encodes ' + f.dec, function () {
|
||||
var buffer = Buffer.alloc(8, 0)
|
||||
const buffer = Buffer.alloc(8, 0)
|
||||
|
||||
bufferutils.writeUInt64LE(buffer, f.dec, 0)
|
||||
assert.strictEqual(buffer.toString('hex'), f.hex)
|
||||
|
@ -39,7 +39,7 @@ describe('bufferutils', function () {
|
|||
|
||||
fixtures.invalid.readUInt64LE.forEach(function (f) {
|
||||
it('throws on ' + f.description, function () {
|
||||
var buffer = Buffer.alloc(8, 0)
|
||||
const buffer = Buffer.alloc(8, 0)
|
||||
|
||||
assert.throws(function () {
|
||||
bufferutils.writeUInt64LE(buffer, f.dec, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue