Can you add Firebase to unit tests in a Swift package?

182 views
Skip to first unread message

Oliver Ernst

unread,
Sep 20, 2021, 3:02:13 PM9/20/21
to Firebase Google Group

I have a Swift package that implements some read/write methods to Firebase. The package has Firebase correctly set up as a dependency. I can add my Swift package to an iOS project and it works correctly.

Now I want to write some unit tests for the Swift package (an XCTestCase) to ensure that the read/write operations are doing what I want.

Is that even possible - can I add Firebase to the tests of a Swift package? Where would you call FirebaseApp.configure()? Does a unit test in a swift package even have a bundle ID to generate the GoogleService-Info.plist?

Thanks

Cross linked from here.
Reply all
Reply to author
Forward
0 new messages