Skip to content

Commit

Permalink
Address detekt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zwarm committed Jun 11, 2024
1 parent fbc2040 commit 82bf5ed
Showing 1 changed file with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.wordpress.android.ui.voicetocontent

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.launch
import org.junit.Before
import org.mockito.Mock
import org.mockito.kotlin.verifyNoInteractions
Expand Down Expand Up @@ -37,22 +34,22 @@ class VoiceToContentViewModelTest : BaseUnitTest() {

private lateinit var viewModel: VoiceToContentViewModel

private var uiStateChanges = mutableListOf<VoiceToContentUiState>()
private val uiState
get() = viewModel.state.value

private fun <T> testUiStateChanges(
block: suspend CoroutineScope.() -> T
) {
test {
uiStateChanges.clear()
val job = launch(testDispatcher()) {
viewModel.state.toList(uiStateChanges)
}
this.block()
job.cancel()
}
}
// private var uiStateChanges = mutableListOf<VoiceToContentUiState>()
// private val uiState
// get() = viewModel.state.value

// private fun <T> testUiStateChanges(
// block: suspend CoroutineScope.() -> T
// ) {
// test {
// uiStateChanges.clear()
// val job = launch(testDispatcher()) {
// viewModel.state.toList(uiStateChanges)
// }
// this.block()
// job.cancel()
// }
// }
/* private val jetpackAIAssistantFeature = JetpackAIAssistantFeature(
hasFeature = true,
isOverLimit = false,
Expand Down

0 comments on commit 82bf5ed

Please sign in to comment.