Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test and deprecation warning #665

Merged
merged 2 commits into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('-'));
Copy link
Contributor

@arb arb Jan 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hoek has a unique file name function.

done();
});

Expand Down
1 change: 1 addition & 0 deletions test/leaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('Leaks', () => {
delete global.DTRACE_NET_SERVER_CONNECTION;

const leaks = Lab.leaks.detect();

expect(leaks.length).to.equal(0);

done();
Expand Down
10 changes: 5 additions & 5 deletions test/reporters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) => {

Expand All @@ -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();
Expand Down Expand Up @@ -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) => {

Expand Down Expand Up @@ -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) => {

Expand Down