Skip to content

Commit

Permalink
test: fix flaky assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 24, 2024
1 parent 35d32bf commit 630d9c3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/logger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

import { test } from '@japa/runner'
import { fileURLToPath } from 'node:url'

import { useColors } from '../src/colors.js'
import { Logger } from '../src/logger/main.js'
Expand Down Expand Up @@ -128,10 +127,7 @@ test.group('Logger | fatal', () => {
assert.lengthOf(renderer.getLogs(), 1)

assert.equal(renderer.getLogs()[0].stream, 'stderr')
assert.match(
renderer.getLogs()[0].message.split('\n')[1],
new RegExp(fileURLToPath(import.meta.url))
)
assert.match(renderer.getLogs()[0].message.split('\n')[1], /logger\.spec\.ts/)
})
})

Expand Down

0 comments on commit 630d9c3

Please sign in to comment.