Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Oct 7, 2024
1 parent 5584387 commit 4a6a22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion api/lib/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ export function setupAll(config: DeepPartial<GatewayConfig>) {
stopCleanJob()

transportsList.forEach((t) => {
t.close()
if (typeof t.close === 'function') {
t.close()
}
})

transportsList = null
Expand Down
4 changes: 2 additions & 2 deletions test/lib/logger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('logger.js', () => {
it('should change the log level', () =>
expect(logger1.level).to.equal('warn'))
it('should have 2 transports', () =>
expect(logger1.transports.length).to.be.equal(3))
expect(logger1.transports.length).to.be.equal(2))
})

describe('setup() (reconfigure)', () => {
Expand All @@ -118,7 +118,7 @@ describe('logger.js', () => {
// Test post-conditions:
expect(logger1.module).to.equal('mod')
expect(logger1.level).to.equal('error')
expect(logger1.transports.length).to.be.equal(3)
expect(logger1.transports.length).to.be.equal(2)
})
})

Expand Down

0 comments on commit 4a6a22e

Please sign in to comment.