Skip to content
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

test: Fix unit tests and add isLaunch test #241

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

einsteinx2
Copy link
Contributor

Summary

I found that there was an MPBackgroundController unit test called testPreviousForegroundTime that was failing only on Github due to the way it was implemented. While investigating that, I found that I had the isLaunch boolean backwards, and it should also have its own unit test.

I also noticed that some tests were disabled for tvOS when there's no reason for that as the behavior should be the same, so I enabled them.

I also fixed how some of the other tests were implemented regarding messageQueue threading.

Testing Plan

  • Confirmed via breakpoints when running the previousForgroundTime test that the assertions are hitting correctly now
  • Tested isLaunch behavior in a test app locally and new unit test added
  • Confirmed all tests run on tvOS as well

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

Copy link
Contributor

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@einsteinx2 einsteinx2 merged commit 976070d into development Nov 30, 2023
11 checks passed
@mparticle-automation
Copy link
Contributor

🎉 This PR is included in version 8.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@einsteinx2 einsteinx2 deleted the test/5981-fix-unit-tests branch June 7, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants