Skip to content

Commit

Permalink
test: fix test case where flow is skipping same value outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mslalith committed May 14, 2022
1 parent 280d7e9 commit 15e08db
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -31,7 +31,7 @@ class LunarPhaseDetailsRepoTest {
private fun getConsecutiveInstants(max: Int): List<Instant> = buildList {
val instant = Clock.System.now()
add(instant)
(1..max).forEach { index ->
(1 until max).forEach { index ->
val duration = index.seconds
add(instant.plus(duration))
}
Expand Down Expand Up @@ -62,7 +62,7 @@ class LunarPhaseDetailsRepoTest {

@Test
fun getUpcomingLunarPhaseStateFlow() = runTest {
val instants = getConsecutiveInstants(max = 6)
val instants = getConsecutiveInstants(max = 1)

val job = launch {
lunarPhaseDetailsRepo.upcomingLunarPhaseStateFlow.test {
Expand Down

0 comments on commit 15e08db

Please sign in to comment.