Skip to content

Fix tests #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2024
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
6 changes: 0 additions & 6 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ jobs:
uses: eskatos/gradle-command-action@v1
with:
arguments: build
- name: Test Report
uses: scacap/action-surefire-report@v1
if: always()
with:
report_paths: "build/test-results/test/TEST-*.xml"
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion src/test/kotlin/AppTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.google.firebase.FirebasePlatform
import com.google.firebase.initialize
import org.junit.Test

class AppTest {
class AppTest : FirebaseTest() {
@Test
fun testInitialize() {
FirebasePlatform.initializeFirebasePlatform(object : FirebasePlatform() {
Expand Down
9 changes: 9 additions & 0 deletions src/test/kotlin/FirebaseTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import com.google.firebase.FirebaseApp
import org.junit.Before

abstract class FirebaseTest {
@Before
fun beforeEach() {
FirebaseApp.clearInstancesForTest()
}
}
2 changes: 1 addition & 1 deletion src/test/kotlin/FirestoreTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.junit.Before
import org.junit.Test
import java.io.File

class FirestoreTest {
class FirestoreTest : FirebaseTest() {
@Before
fun initialize() {
FirebasePlatform.initializeFirebasePlatform(object : FirebasePlatform() {
Expand Down
Loading