diff --git a/.travis.yml b/.travis.yml index 1c219c2..87bcdc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,5 @@ language: node_js node_js: - - '0.10' - - '0.12' - - '4' - - '5' - - '6' - '8' - '10' - '11' diff --git a/package.json b/package.json index 7cf1158..33e032f 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ }, "license": "MIT", "devDependencies": { - "debug": "^2.1.2", - "tap": "^1.3.2" + "debug": "^4.1.1", + "tap": "^13.1.2" }, "dependencies": { "nan": "^2.13.2" diff --git a/test/test-core.js b/test/test-core.js index cc263db..d3e1ddc 100644 --- a/test/test-core.js +++ b/test/test-core.js @@ -39,7 +39,7 @@ function accept(m) { } accept('string'); -accept(Buffer('buffer')); +accept(Buffer.from('buffer')); accept(undefined); accept(null); accept({some: 5}); diff --git a/test/test-openlog.js b/test/test-openlog.js index d01750e..dac70f2 100644 --- a/test/test-openlog.js +++ b/test/test-openlog.js @@ -13,12 +13,10 @@ tap.test(function(t) { t.doesNotThrow(function() { syslog.open('June', o.LOG_PERROR + o.LOG_PID, f.LOG_LOCAL1); syslog.upto('LOG_DEBUG'); - t.comment('Expect on stderr a greeting to June with a PID:'); - syslog.log('LOG_DEBUG', 'Hi, June', function() { + syslog.log('LOG_DEBUG', 'expected on stderr with a PID', function() { syslog.open('Leonie', o.LOG_PERROR, f.LOG_LOCAL2); syslog.upto('LOG_DEBUG'); - t.comment('Expect on stderr a greeting to Leonie without a PID:'); - syslog.debug('Hi, %s', 'Leonie'); + syslog.debug('Expected on stderr %s a PID', 'without'); }); }, 'open and log'); t.end(); diff --git a/test/test-syslog.js b/test/test-syslog.js index d7b9dc2..4b99fa2 100644 --- a/test/test-syslog.js +++ b/test/test-syslog.js @@ -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; } @@ -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'));