sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Deduplicate SentryOptions default value tests

Open armcknight opened this issue 2 years ago • 1 comments

Description

We have lots of test methods that test each option's default value in isolation: image

but we also have a big method that asserts all the default values at https://github.com/getsentry/sentry-cocoa/blob/42ef6baf82435c9e60f92974097657417ca4839a/Tests/SentryTests/SentryOptionsTest.m#L571-L647

Each of the individual methods instantiates a SentryOptions like so: SentryOptions *options = [self getValidOptions:@{}];, but we could just create one and call assertDefaultValues on it.

armcknight avatar Jan 20 '24 01:01 armcknight

I agree that this is suboptimal, but we rarely change these tests, and the options also hardly ever change. I would also be OK with keeping them as is, but fixing it also makes sense.

philipphofmann avatar Jan 31 '24 13:01 philipphofmann