Skip to content

Commit

Permalink
test(ofx): Fix some test flakyness
Browse files Browse the repository at this point in the history
The lambda is evaluated for both expected and actual texts in between
which the seconds of time could have changed.
  • Loading branch information
sschuberth committed Apr 29, 2024
1 parent abf459a commit a50ff78
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import dev.schuberth.stan.AbstractTextExporterFunTest

import java.time.LocalDateTime

private val DTSERVER = LocalDateTime.now().format(OfxExporter.DATE_FORMATTER)

class OfxExporterFunTest : AbstractTextExporterFunTest(
OfxExporter(),
{ replace(Regex("(<DTSERVER>)\\d+"), "$1${LocalDateTime.now().format(OfxExporter.DATE_FORMATTER)}") }
{ replace(Regex("(<DTSERVER>)\\d+"), "$1$DTSERVER") }
)

0 comments on commit a50ff78

Please sign in to comment.