Skip to content

Commit

Permalink
test: cancelAndIgnoreRemainingEvents로 종료 명시
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyCh0 committed Oct 5, 2023
1 parent 0ca2bc8 commit 212c9af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class FestivalListViewModelTest {

// then
assertThat(awaitItem()).isExactlyInstanceOf(FestivalListEvent.ShowTicketReserve::class.java)
cancelAndIgnoreRemainingEvents()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class MyPageViewModelTest {

// then
assertThat(awaitItem()).isExactlyInstanceOf(MyPageEvent.ShowSignIn::class.java)
cancelAndIgnoreRemainingEvents()
}
}

Expand Down Expand Up @@ -243,6 +244,7 @@ class MyPageViewModelTest {
assertThat(vm.uiState.value.shouldShowError).isEqualTo(true)
}
softly.assertAll()
cancelAndIgnoreRemainingEvents()
}
}

Expand All @@ -254,6 +256,7 @@ class MyPageViewModelTest {

// then
assertThat(awaitItem()).isExactlyInstanceOf(MyPageEvent.ShowConfirmDelete::class.java)
cancelAndIgnoreRemainingEvents()
}
}

Expand Down Expand Up @@ -281,6 +284,7 @@ class MyPageViewModelTest {
assertThat(vm.uiState.value.shouldShowError).isEqualTo(true)
}
softly.assertAll()
cancelAndIgnoreRemainingEvents()
}
}
}

0 comments on commit 212c9af

Please sign in to comment.