Skip to content

Commit

Permalink
fix(minilog): Clean up minilog.test.js
Browse files Browse the repository at this point in the history
- Import order
- Unused property removed
- Deprecated Node API updated (Buffer)
  • Loading branch information
acezard committed Mar 10, 2023
1 parent 1c32dd4 commit d24624a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/cozy-minilog/test/minilog.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
var fs = require('fs'),
assert = require('assert'),
MiniLog = require('../src/index.js'),
Stringifier = require('../src/node/stringify.js'),
Transform = require('../src/common/transform.js')
var assert = require('assert')
var fs = require('fs')

var Transform = require('../src/common/transform.js')
var MiniLog = require('../src/index.js')
var Stringifier = require('../src/node/stringify.js')

function WriteStream() {
// eslint-disable-next-line no-unused-vars
var self = this
this.writable = true
this.content = []
}
Expand Down Expand Up @@ -145,7 +144,7 @@ exports['given a minilog'] = {
},

"logging a buffer doesn't look horrible": function () {
this.log(new Buffer('Hello world'))
this.log(Buffer.from('Hello world'))
assert.equal(this.stream.content[0], 'Hello world\n')
},

Expand Down

0 comments on commit d24624a

Please sign in to comment.