PostHog / posthog-ios

PostHog iOS SDK
https://posthog.com/docs/libraries/ios
MIT License
29 stars 37 forks source link

Unit tests and refactoring to make it testable #84

Closed marandaneto closed 8 months ago

marandaneto commented 8 months ago

What does this PR do?

Add tests for almost every class, also has a lot of fixing found during testing.

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide? More tests can be added specifically for PostHogQueue, but its ok to add it later as well, its a bit complicated due to time advancing, and the URLSession callback approach, but I can expand it in another PR so we can unblock this PR that is getting quite big already.

What are the relevant tickets?

Screenshots or screencasts (if UI/UX change)

Questions: