Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ internal class DdSdkSessionStartedListener private constructor(): RumSessionList
this.exceptionHandler = exceptionHandler
}

@TestOnly
fun setIsNewArchitecture(isNewArch: Boolean) {
this.isNewArchitecture = isNewArch
}

private fun hasValidBridge(): Boolean {
val context = reactContext ?: return false
val instance = context.catalystInstance ?: return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ internal class DdSdkSessionStartedListenerTest {
val instance = DdSdkSessionStartedListener.getInstance()
instance.setReactContext(mockReactContext)
instance.setExceptionHandler(mockExceptionHandler)
instance.setIsNewArchitecture(false)

val passedArgs = mutableListOf<String>()
instance.setConvertToNativeArray {
Expand Down Expand Up @@ -124,6 +125,7 @@ internal class DdSdkSessionStartedListenerTest {

val mockConvertToNativeArray = mock<(array: Array<String>) -> NativeArray?>()
instance.setConvertToNativeArray(mockConvertToNativeArray)
instance.setIsNewArchitecture(false)

// WHEN
instance.onSessionStarted("TEST-SESSION-ID", false)
Expand Down
Loading