Răsfoiți Sursa

Put LoggingManager.initialize back as it was in tests

Christopher Hoskin 6 ani în urmă
părinte
comite
ea502a0623
1 a modificat fișierele cu 1 adăugiri și 4 ștergeri
  1. 1 4
      libraries/logger/test/unit/loggingManagerTests.js

+ 1 - 4
libraries/logger/test/unit/loggingManagerTests.js

@@ -107,21 +107,18 @@ describe('LoggingManager', function () {
     describe('in production', function () {
       beforeEach(function () {
         process.env.NODE_ENV = 'production'
+        this.logger = this.LoggingManager.initialize(this.loggerName)
       })
 
       afterEach(() => delete process.env.NODE_ENV)
 
       it('should default to log level warn', function () {
-        this.logger = this.LoggingManager.initialize(this.loggerName)
         this.Bunyan.createLogger.firstCall.args[0].streams[0].level.should.equal(
           'warn'
         )
       })       
       
       describe('logLevelSource file', function () {
-        beforeEach(function() {
-          this.logger = this.LoggingManager.initialize(this.loggerName)
-        })
 
         it('should run checkLogLevel', function () {
           this.checkLogLevelStub.should.have.been.calledOnce