Skip to content

Commit

Permalink
test: remove use of deprecated Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-github committed May 6, 2019
1 parent dcf9798 commit 57ae830
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/test-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function accept(m) {
}

accept('string');
accept(Buffer('buffer'));
accept(Buffer.from('buffer'));
accept(undefined);
accept(null);
accept({some: 5});
Expand Down
6 changes: 3 additions & 3 deletions test/test-syslog.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function expect(l, m) {
currentMask, ++count, l, Buffer.isBuffer(m) ? 'buf' : 'str');

if (Buffer.isBuffer(m)) {
m = Buffer(prefix + m);
m = Buffer.from(prefix + m);
} else {
m = prefix + m;
}
Expand All @@ -62,9 +62,9 @@ function masked(l, m) {
setmask(0xff);

expect('LOG_CRIT', 'message');
expect('LOG_CRIT', Buffer('message'));
expect('LOG_CRIT', Buffer.from('message'));
expect(l.LOG_CRIT, 'message');
expect(l.LOG_CRIT, Buffer('message'));
expect(l.LOG_CRIT, Buffer.from('message'));
expect(l.LOG_DEBUG, 'debug');

setmask(syslog.logUpto('LOG_INFO'));
Expand Down

0 comments on commit 57ae830

Please sign in to comment.