Skip to content

Commit dbf61df

Browse files
authored
Add unit tests (#25)
* add tests for bundler and embeddedjs * add tests for jsanalytics * update js analytics tests * move js analytics tests to android tests * fix * fix * fix * fix * fix * fix * add LivePluginTest * add LivePluginsTest * bug fix * fix test * fix test * more tests * fix * fix
1 parent d28704f commit dbf61df

File tree

11 files changed

+1704
-23
lines changed

11 files changed

+1704
-23
lines changed

analytics-kotlin-live/build.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,24 @@ dependencies {
4141
implementation 'androidx.core:core-ktx:1.13.0'
4242
implementation 'androidx.appcompat:appcompat:1.6.1'
4343
implementation 'com.google.android.material:material:1.11.0'
44-
testImplementation 'junit:junit:4.13.2'
44+
// TESTING
45+
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
46+
androidTestImplementation 'io.mockk:mockk-android:1.12.2'
47+
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1'
4548
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
4649
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
50+
51+
// Add JUnit5 dependencies.
52+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
53+
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
54+
55+
// Add JUnit4 legacy dependencies.
56+
testImplementation 'junit:junit:4.13.2'
57+
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2'
58+
59+
// Roboelectric dependencies for JVM unit tests only
60+
testImplementation 'org.robolectric:robolectric:4.16'
61+
testImplementation 'androidx.test:core:1.5.0'
4762
}
4863
task sourcesJar(type: Jar) {
4964
archiveClassifier.set('sources')

0 commit comments

Comments
 (0)