chre: fix linting

This commit is contained in:
David Dias 2017-10-13 17:17:11 +02:00
parent 0a515f8fda
commit 50d6a7b7cf

View File

@ -144,7 +144,7 @@ describe('dial', () => {
listener = tcp.createListener((conn) => { listener = tcp.createListener((conn) => {
pull( pull(
conn, conn,
pull.map((x) => new Buffer(x.toString() + '!')), pull.map((x) => Buffer.from(x.toString() + '!')),
conn conn
) )
}) })
@ -161,7 +161,7 @@ describe('dial', () => {
tcp.dial(ma), tcp.dial(ma),
pull.collect((err, values) => { pull.collect((err, values) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(values).to.eql([new Buffer('hey!')]) expect(values).to.eql([Buffer.from('hey!')])
done() done()
}) })
) )
@ -190,7 +190,7 @@ describe('dial', () => {
pull.collect((err, values) => { pull.collect((err, values) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(values).to.be.eql([new Buffer('hey')]) expect(values).to.be.eql([Buffer.from('hey')])
listener.close(done) listener.close(done)
}) })
@ -254,7 +254,7 @@ describe('dial', () => {
conn, conn,
pull.collect((err, res) => { pull.collect((err, res) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(res).to.be.eql([new Buffer('hey!')]) expect(res).to.be.eql([Buffer.from('hey!')])
done() done()
}) })
) )
@ -425,7 +425,7 @@ describe('Connection wrap', () => {
connWrap, connWrap,
pull.collect((err, chunks) => { pull.collect((err, chunks) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(chunks).to.be.eql([new Buffer('hey')]) expect(chunks).to.be.eql([Buffer.from('hey')])
connWrap.getPeerInfo((err, peerInfo) => { connWrap.getPeerInfo((err, peerInfo) => {
expect(err).to.not.exist() expect(err).to.not.exist()
@ -444,7 +444,7 @@ describe('Connection wrap', () => {
connWrap, connWrap,
pull.collect((err, chunks) => { pull.collect((err, chunks) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(chunks).to.be.eql([new Buffer('hey')]) expect(chunks).to.be.eql([Buffer.from('hey')])
done() done()
}) })
) )
@ -470,7 +470,7 @@ describe('Connection wrap', () => {
connWrap, connWrap,
pull.collect((err, chunks) => { pull.collect((err, chunks) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(chunks).to.be.eql([new Buffer('hey')]) expect(chunks).to.be.eql([Buffer.from('hey')])
done() done()
}) })
) )
@ -497,7 +497,7 @@ describe('Connection wrap', () => {
connWrap3, connWrap3,
pull.collect((err, chunks) => { pull.collect((err, chunks) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(chunks).to.be.eql([new Buffer('hey')]) expect(chunks).to.be.eql([Buffer.from('hey')])
connWrap3.getPeerInfo((err, peerInfo) => { connWrap3.getPeerInfo((err, peerInfo) => {
expect(err).to.not.exist() expect(err).to.not.exist()
expect(peerInfo).to.equal('inner doll') expect(peerInfo).to.equal('inner doll')