Skip to content

Commit

Permalink
check module name as well
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Jul 16, 2024
1 parent 9b165c2 commit 8f196ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/integration/logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('LogDatabase CRUD', () => {
meta: 'Test meta information'
}
// Trigger a log event which should be saved in the database
logger.logMessage(newLogEntry.message, true)
logger.logMessage(newLogEntry.message)

// Wait for the log to be written to the database
await new Promise((resolve) => setTimeout(resolve, 1000)) // Delay to allow log to be processed
Expand All @@ -108,7 +108,7 @@ describe('LogDatabase CRUD', () => {
expect(Number(logs?.[0].id)).to.greaterThan(Number(logId))
expect(logs?.[0].level).to.equal(newLogEntry.level)
expect(logs?.[0].message).to.equal(newLogEntry.message)
expect(logs?.[0].moduleName).to.equal(newLogEntry.moduleName) // 'HTTP'
expect(logs?.[0].moduleName).to.equal('HTTP')
})

it('should save a log in the database when a log.logMessageWithEmoji is called', async () => {
Expand All @@ -120,7 +120,7 @@ describe('LogDatabase CRUD', () => {
meta: 'Test meta information'
}
// Trigger a log event which should be saved in the database
logger.logMessageWithEmoji(newLogEntry.message, true)
logger.logMessageWithEmoji(newLogEntry.message)

// Wait for the log to be written to the database
await new Promise((resolve) => setTimeout(resolve, 1000)) // Delay to allow log to be processed
Expand All @@ -139,7 +139,7 @@ describe('LogDatabase CRUD', () => {
expect(Number(logs?.[0].id)).to.greaterThan(Number(logId))
expect(logs?.[0].level).to.equal(newLogEntry.level)
assert(logs?.[0].message)
expect(logs?.[0].moduleName).to.equal(newLogEntry.moduleName) // HTTP
expect(logs?.[0].moduleName).to.equal('HTTP')
})
})

Expand Down

0 comments on commit 8f196ad

Please sign in to comment.