Skip to content

Commit

Permalink
clear debug messages, restore deleted line accidentally
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Jul 25, 2024
1 parent 111e2e6 commit e85e001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/test/unit/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,11 @@ describe('Logger instances and transports tests', async () => {
null,
buildEnvOverrideConfig([ENVIRONMENT_VARIABLES.LOG_DB], ['true'])
)
console.log('env after', envAfter)
expect(USE_DB_TRANSPORT()).to.be.equal(true)
// will build the DB transport layer
console.log('before config')
const config = await getConfiguration(true)
console.log('after config: ', config)
// eslint-disable-next-line no-unused-vars
const DB = await new Database(config.dbConfig)
console.log('after DB')
// Could generate Typesene error if DB is not running, but does not matter for this test
OCEAN_NODE_LOGGER.logMessage('Should build DB transport layer')

Expand All @@ -77,7 +73,7 @@ describe('Logger instances and transports tests', async () => {
OCEAN_NODE_LOGGER.removeTransport(transports[0])
expect(OCEAN_NODE_LOGGER.hasDBTransport()).to.be.equal(false)
await tearDownEnvironment(envAfter)
expect(process.env.LOG_DB).to.be.equal('false')
expect(USE_DB_TRANSPORT()).to.be.equal(false)
})

after(() => {
Expand Down
1 change: 1 addition & 0 deletions src/test/utils/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const mochaHooks = {
CONFIG_LOGGER.debug(
`(Hook) Restoring environment variable: ${varName} \ncurrent:\n ${process.env[varName]} \noriginal:\n ${initialVariable.originalValue}`
)
process.env[varName] = initialVariable.originalValue
}
})
}
Expand Down

0 comments on commit e85e001

Please sign in to comment.