From 2e2a0783bf8fa2c6a3c82270550921cc6402ffbc Mon Sep 17 00:00:00 2001 From: James Sumners Date: Sat, 24 Aug 2019 21:04:23 -0400 Subject: [PATCH] Create new instances of the null logger to remove potential side effects --- lib/client/index.js | 4 +--- lib/index.js | 3 +-- test/client.test.js | 2 +- test/messages/del_request.test.js | 2 +- test/messages/parser.test.js | 2 +- test/server.test.js | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/client/index.js b/lib/client/index.js index a81d7a9..0deed74 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -1,8 +1,6 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. -var assert = require('assert'); - -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); var Client = require('./client'); diff --git a/lib/index.js b/lib/index.js index b29f5e4..940664c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,6 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); var client = require('./client'); var Attribute = require('./attribute'); @@ -8,7 +8,6 @@ var Change = require('./change'); var Protocol = require('./protocol'); var Server = require('./server'); -var assert = require('assert'); var controls = require('./controls'); var persistentSearch = require('./persistent_search'); var dn = require('./dn'); diff --git a/test/client.test.js b/test/client.test.js index d65c469..a4b39d8 100644 --- a/test/client.test.js +++ b/test/client.test.js @@ -1,6 +1,6 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); var test = require('tape').test; var uuid = require('node-uuid'); diff --git a/test/messages/del_request.test.js b/test/messages/del_request.test.js index a53e831..8600ac4 100644 --- a/test/messages/del_request.test.js +++ b/test/messages/del_request.test.js @@ -2,7 +2,7 @@ var asn1 = require('asn1'); -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); var test = require('tape').test; diff --git a/test/messages/parser.test.js b/test/messages/parser.test.js index 5bd9818..8a2d0cb 100644 --- a/test/messages/parser.test.js +++ b/test/messages/parser.test.js @@ -1,7 +1,7 @@ // Copyright 2014 Joyent, Inc. All rights reserved. var test = require('tape').test; -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); ///--- Globals diff --git a/test/server.test.js b/test/server.test.js index 0299c6e..1ac9227 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -1,6 +1,6 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. -var logger = require('abstract-logging'); +var logger = Object.create(require('abstract-logging')); var test = require('tape').test; var uuid = require('node-uuid');