Skip to content

Commit 1bb8d23

Browse files
committed
Override logging in the correct test.
1 parent 89fddb4 commit 1bb8d23

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/internal/tls.test.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ var hasFeature = require("../../lib/v1/internal/features");
2525
describe('trust-signed-certificates', function() {
2626

2727
var driver;
28-
28+
var log = console.log
29+
beforeEach(function() {
30+
console.log = function () {}; // To mute deprecation message in test output
31+
})
2932
it('should reject unknown certificates', function(done) {
3033
// Assuming we only run this test on NodeJS
3134
if( !NodeChannel.available ) {
@@ -87,16 +90,13 @@ describe('trust-signed-certificates', function() {
8790
if( driver ) {
8891
driver.close();
8992
}
93+
console.log = log;
9094
});
9195
});
9296

9397
describe('trust-custom-ca-signed-certificates', function() {
9498

9599
var driver;
96-
var log = console.log
97-
beforeEach(function() {
98-
console.log = function () {}; // To mute deprecation message in test output
99-
})
100100
it('should reject unknown certificates', function(done) {
101101
// Assuming we only run this test on NodeJS
102102
if( !NodeChannel.available ) {
@@ -140,7 +140,6 @@ describe('trust-custom-ca-signed-certificates', function() {
140140
if( driver ) {
141141
driver.close();
142142
}
143-
console.log = log;
144143
});
145144
});
146145

0 commit comments

Comments
 (0)