awaitItem()
will return the first emitted value in the flow, which is an empty list of TvShow
in your case. Could you try using expectMostRecentItem()
to get the latest emitted value?
viewModel.recentTvShowList.test {
assertEquals(expectedList, expectMostRecentItem())
}