@@ -193,9 +193,32 @@ isolate_dso_base: 10000000
193193 });
194194 }
195195
196- test ('does not add itself to sdk.integrations if app is not obfuscated ' , () {
196+ test ('does add itself to sdk.integrations if split debug info is true ' , () {
197197 final fixture = Fixture ()
198- ..options.runtimeChecker = MockRuntimeChecker (isObfuscated: false );
198+ ..options.runtimeChecker = MockRuntimeChecker (isSplitDebugInfo: true );
199+ fixture.callIntegration ();
200+ expect (
201+ fixture.options.sdk.integrations
202+ .contains (LoadDartDebugImagesIntegration .integrationName),
203+ isTrue,
204+ );
205+ });
206+
207+ test ('does add itself to sdk.integrations if obfuscation is true' , () {
208+ final fixture = Fixture ()
209+ ..options.runtimeChecker = MockRuntimeChecker (isObfuscated: true );
210+ fixture.callIntegration ();
211+ expect (
212+ fixture.options.sdk.integrations
213+ .contains (LoadDartDebugImagesIntegration .integrationName),
214+ isTrue,
215+ );
216+ });
217+
218+ test (
219+ 'does not add itself to sdk.integrations if app obfuscation and split debug info is false' ,
220+ () {
221+ final fixture = Fixture ()..options.runtimeChecker = MockRuntimeChecker ();
199222 fixture.callIntegration ();
200223 expect (
201224 fixture.options.sdk.integrations
@@ -204,9 +227,24 @@ isolate_dso_base: 10000000
204227 );
205228 });
206229
207- test ('does not add event processor to options if app is not obfuscated ' , () {
230+ test ('does add event processor to options if split debug info is true ' , () {
208231 final fixture = Fixture ()
209- ..options.runtimeChecker = MockRuntimeChecker (isObfuscated: false );
232+ ..options.runtimeChecker = MockRuntimeChecker (isSplitDebugInfo: true );
233+ fixture.callIntegration ();
234+ expect (fixture.options.eventProcessors.length, 1 );
235+ });
236+
237+ test ('does add event processor to options if obfuscation is true' , () {
238+ final fixture = Fixture ()
239+ ..options.runtimeChecker = MockRuntimeChecker (isObfuscated: true );
240+ fixture.callIntegration ();
241+ expect (fixture.options.eventProcessors.length, 1 );
242+ });
243+
244+ test (
245+ 'does not add event processor to options if app obfuscation and split debug info is false' ,
246+ () {
247+ final fixture = Fixture ()..options.runtimeChecker = MockRuntimeChecker ();
210248 fixture.callIntegration ();
211249 expect (fixture.options.eventProcessors.length, 0 );
212250 });
@@ -239,7 +277,8 @@ isolate_dso_base: 40000000
239277
240278class Fixture {
241279 final options = defaultTestOptions ()
242- ..runtimeChecker = MockRuntimeChecker (isObfuscated: true );
280+ ..runtimeChecker =
281+ MockRuntimeChecker (isObfuscated: true , isSplitDebugInfo: true );
243282 late final factory = SentryStackTraceFactory (options);
244283
245284 void callIntegration () {
0 commit comments