From ba12beac4250c041a63d789e724114402d5cfae6 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Tue, 1 Oct 2024 16:38:13 +0200 Subject: [PATCH 1/5] update test --- dart/test/test_utils.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dart/test/test_utils.dart b/dart/test/test_utils.dart index ec25b32f8..c96a96ee5 100644 --- a/dart/test/test_utils.dart +++ b/dart/test/test_utils.dart @@ -145,7 +145,12 @@ Future testCaptureException( // the localhost port can change final absPathUri = Uri.parse(topFrame['abs_path'] as String); expect(absPathUri.host, 'localhost'); - expect(absPathUri.path, '/sentry_browser_test.dart.browser_test.dart.js'); + expect( + absPathUri.path, + anyOf([ + '/sentry_browser_test.dart.browser_test.dart.js', + '/sentry_browser_test.dart.browser_test.dart.wasm' + ])); expect( topFrame['filename'], From 443c53f2caf7370ff766e202d4750778ff0fceff Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Tue, 1 Oct 2024 16:57:48 +0200 Subject: [PATCH 2/5] update test --- dart/test/test_utils.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dart/test/test_utils.dart b/dart/test/test_utils.dart index c96a96ee5..fc7636de5 100644 --- a/dart/test/test_utils.dart +++ b/dart/test/test_utils.dart @@ -145,17 +145,14 @@ Future testCaptureException( // the localhost port can change final absPathUri = Uri.parse(topFrame['abs_path'] as String); expect(absPathUri.host, 'localhost'); + expect(absPathUri.path, '/sentry_browser_test.dart.browser_test.dart.js'); + expect( - absPathUri.path, + topFrame['filename'], anyOf([ '/sentry_browser_test.dart.browser_test.dart.js', '/sentry_browser_test.dart.browser_test.dart.wasm' ])); - - expect( - topFrame['filename'], - 'sentry_browser_test.dart.browser_test.dart.js', - ); expect(topFrame['function'], 'Object.wrapException'); expect(data['event_id'], sentryId.toString()); From 4b9e72dc8d3c20d59b5913a3ac740fa46c2130bf Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Tue, 1 Oct 2024 17:31:55 +0200 Subject: [PATCH 3/5] remove / --- dart/test/test_utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dart/test/test_utils.dart b/dart/test/test_utils.dart index fc7636de5..46af6ca5e 100644 --- a/dart/test/test_utils.dart +++ b/dart/test/test_utils.dart @@ -150,8 +150,8 @@ Future testCaptureException( expect( topFrame['filename'], anyOf([ - '/sentry_browser_test.dart.browser_test.dart.js', - '/sentry_browser_test.dart.browser_test.dart.wasm' + 'sentry_browser_test.dart.browser_test.dart.js', + 'sentry_browser_test.dart.browser_test.dart.wasm' ])); expect(topFrame['function'], 'Object.wrapException'); From a69d46ec738108f8892ab27b35b6b6d75ee7341c Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Tue, 1 Oct 2024 17:48:35 +0200 Subject: [PATCH 4/5] update --- dart/test/test_utils.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dart/test/test_utils.dart b/dart/test/test_utils.dart index 46af6ca5e..c58ba48d8 100644 --- a/dart/test/test_utils.dart +++ b/dart/test/test_utils.dart @@ -145,7 +145,12 @@ Future testCaptureException( // the localhost port can change final absPathUri = Uri.parse(topFrame['abs_path'] as String); expect(absPathUri.host, 'localhost'); - expect(absPathUri.path, '/sentry_browser_test.dart.browser_test.dart.js'); + expect( + absPathUri.path, + anyOf([ + '/sentry_browser_test.dart.browser_test.dart.js', + '/sentry_browser_test.dart.browser_test.dart.wasm' + ])); expect( topFrame['filename'], From ac4004558aaf5ae64e87b92ad2b361db6de14f3e Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Wed, 2 Oct 2024 22:08:31 +0200 Subject: [PATCH 5/5] update --- dart/test/test_utils.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dart/test/test_utils.dart b/dart/test/test_utils.dart index c58ba48d8..40afa2f4d 100644 --- a/dart/test/test_utils.dart +++ b/dart/test/test_utils.dart @@ -158,7 +158,8 @@ Future testCaptureException( 'sentry_browser_test.dart.browser_test.dart.js', 'sentry_browser_test.dart.browser_test.dart.wasm' ])); - expect(topFrame['function'], 'Object.wrapException'); + expect(topFrame['function'], + anyOf(['Object.wrapException', 'testCaptureException'])); expect(data['event_id'], sentryId.toString()); expect(data['timestamp'], '2017-01-02T00:00:00.000Z');