File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed
browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
7
7
sentryTest (
8
8
'Instrumentation does not fail when using frozen callback for setTimeout' ,
9
9
async ( { getLocalTestPath, page } ) => {
10
+ const bundleKey = process . env . PW_BUNDLE || '' ;
11
+ const hasDebug = ! bundleKey . includes ( '_min' ) ;
12
+
10
13
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
11
14
12
15
const logMessages : string [ ] = [ ] ;
@@ -31,12 +34,15 @@ sentryTest(
31
34
} ,
32
35
} ) ;
33
36
34
- expect ( logMessages ) . toEqual (
35
- expect . arrayContaining ( [
36
- expect . stringContaining (
37
- 'Sentry Logger [log]: Failed to add non-enumerable property "__sentry_wrapped__" to object function callback()' ,
38
- ) ,
39
- ] ) ,
40
- ) ;
37
+ // We only care about the message when debug is enabled
38
+ if ( hasDebug ) {
39
+ expect ( logMessages ) . toEqual (
40
+ expect . arrayContaining ( [
41
+ expect . stringContaining (
42
+ 'Sentry Logger [log]: Failed to add non-enumerable property "__sentry_wrapped__" to object function callback()' ,
43
+ ) ,
44
+ ] ) ,
45
+ ) ;
46
+ }
41
47
} ,
42
48
) ;
Original file line number Diff line number Diff line change 1
1
import { getReportDialogEndpoint , SDK_VERSION } from '@sentry/core' ;
2
- import { WrappedFunction } from '@sentry/types' ;
2
+ import type { WrappedFunction } from '@sentry/types' ;
3
3
import * as utils from '@sentry/utils' ;
4
4
5
5
import type { Event } from '../../src' ;
Original file line number Diff line number Diff line change 2
2
* @jest -environment jsdom
3
3
*/
4
4
5
- import { WrappedFunction } from '@sentry/types' ;
5
+ import type { WrappedFunction } from '@sentry/types' ;
6
+
6
7
import {
8
+ addNonEnumerableProperty ,
7
9
dropUndefinedKeys ,
8
10
extractExceptionKeysForMessage ,
9
11
fill ,
12
+ markFunctionWrapped ,
10
13
objectify ,
11
14
urlEncode ,
12
- addNonEnumerableProperty ,
13
- markFunctionWrapped ,
14
15
} from '../src/object' ;
15
16
import { testOnlyIfNodeVersionAtLeast } from './testutils' ;
16
17
You can’t perform that action at this time.
0 commit comments