From ffe06186643d8bc6ae40452e7c439ecffd51e09b Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Thu, 12 Jan 2017 09:25:17 -0600 Subject: [PATCH] Fix deprecation warning (#665) --- test/cli.js | 2 +- test/leaks.js | 1 + test/reporters.js | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cli.js b/test/cli.js index bf4b1564..66174d6d 100755 --- a/test/cli.js +++ b/test/cli.js @@ -623,7 +623,7 @@ describe('CLI', () => { let filename; beforeEach((done) => { - filename = Path.join(Os.tmpDir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); + filename = Path.join(Os.tmpdir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); done(); }); diff --git a/test/leaks.js b/test/leaks.js index e7b98de4..921d5488 100755 --- a/test/leaks.js +++ b/test/leaks.js @@ -73,6 +73,7 @@ describe('Leaks', () => { delete global.DTRACE_NET_SERVER_CONNECTION; const leaks = Lab.leaks.detect(); + expect(leaks.length).to.equal(0); done(); diff --git a/test/reporters.js b/test/reporters.js index c015536c..9c9c46cd 100755 --- a/test/reporters.js +++ b/test/reporters.js @@ -79,7 +79,7 @@ describe('Reporter', () => { }); }); - const filename = Path.join(Os.tmpDir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); + const filename = Path.join(Os.tmpdir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); Lab.report(script, { output: filename }, (err, code, output) => { expect(err).to.not.exist(); @@ -102,7 +102,7 @@ describe('Reporter', () => { }); const randomname = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-'); - const folder = Path.join(Os.tmpDir(), randomname); + const folder = Path.join(Os.tmpdir(), randomname); const filename = Path.join(folder, randomname); Lab.report(script, { output: filename }, (err, code, output) => { @@ -126,7 +126,7 @@ describe('Reporter', () => { }); }); - const filename = Path.join(Os.tmpDir(), [Date.now(), process.pid, Crypto.randomBytes(7).toString('hex')].join('-')); + const filename = Path.join(Os.tmpdir(), [Date.now(), process.pid, Crypto.randomBytes(7).toString('hex')].join('-')); Lab.report(script, { reporter: ['console'], output: [filename] }, (err, code, output) => { expect(err).to.not.exist(); @@ -2080,7 +2080,7 @@ describe('Reporter', () => { }); const recorder = new Recorder(); - const filename = Path.join(Os.tmpDir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); + const filename = Path.join(Os.tmpdir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); Lab.report(script, { reporter: ['lcov', 'console'], output: [filename, recorder], coverage: true }, (err, code, output) => { @@ -2122,7 +2122,7 @@ describe('Reporter', () => { }); const recorder = new Recorder(); - const filename = Path.join(Os.tmpDir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); + const filename = Path.join(Os.tmpdir(), [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-')); Lab.report(script, { reporter: ['console', 'console'], output: [filename, recorder], coverage: true }, (err, code, output) => {