@@ -42,26 +42,6 @@ describe('Integration | integrationSettings', () => {
42
42
mockConsole . mockRestore ( ) ;
43
43
} ) ;
44
44
45
- it ( 'works with defining settings in integration' , async ( ) => {
46
- const { replay } = await mockSdk ( {
47
- replayOptions : { sessionSampleRate : 0.5 } ,
48
- sentryOptions : { replaysSessionSampleRate : undefined } ,
49
- } ) ;
50
-
51
- expect ( replay . getOptions ( ) . sessionSampleRate ) . toBe ( 0.5 ) ;
52
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
53
- } ) ;
54
-
55
- it ( 'works with defining 0 in integration but logs warnings' , async ( ) => {
56
- const { replay } = await mockSdk ( {
57
- replayOptions : { sessionSampleRate : 0 } ,
58
- sentryOptions : { replaysSessionSampleRate : undefined } ,
59
- } ) ;
60
-
61
- expect ( replay . getOptions ( ) . sessionSampleRate ) . toBe ( 0 ) ;
62
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
63
- } ) ;
64
-
65
45
it ( 'works with defining settings in SDK' , async ( ) => {
66
46
const { replay } = await mockSdk ( { sentryOptions : { replaysSessionSampleRate : 0.5 } , replayOptions : { } } ) ;
67
47
@@ -75,26 +55,6 @@ describe('Integration | integrationSettings', () => {
75
55
expect ( replay . getOptions ( ) . sessionSampleRate ) . toBe ( 0 ) ;
76
56
expect ( mockConsole ) . toBeCalledTimes ( 0 ) ;
77
57
} ) ;
78
-
79
- it ( 'SDK option takes precedence' , async ( ) => {
80
- const { replay } = await mockSdk ( {
81
- sentryOptions : { replaysSessionSampleRate : 0.5 } ,
82
- replayOptions : { sessionSampleRate : 0.1 } ,
83
- } ) ;
84
-
85
- expect ( replay . getOptions ( ) . sessionSampleRate ) . toBe ( 0.5 ) ;
86
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
87
- } ) ;
88
-
89
- it ( 'SDK option takes precedence even when 0' , async ( ) => {
90
- const { replay } = await mockSdk ( {
91
- sentryOptions : { replaysSessionSampleRate : 0 } ,
92
- replayOptions : { sessionSampleRate : 0.1 } ,
93
- } ) ;
94
-
95
- expect ( replay . getOptions ( ) . sessionSampleRate ) . toBe ( 0 ) ;
96
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
97
- } ) ;
98
58
} ) ;
99
59
100
60
describe ( 'replaysOnErrorSampleRate' , ( ) => {
@@ -108,26 +68,6 @@ describe('Integration | integrationSettings', () => {
108
68
mockConsole . mockRestore ( ) ;
109
69
} ) ;
110
70
111
- it ( 'works with defining settings in integration' , async ( ) => {
112
- const { replay } = await mockSdk ( {
113
- replayOptions : { errorSampleRate : 0.5 } ,
114
- sentryOptions : { replaysOnErrorSampleRate : undefined } ,
115
- } ) ;
116
-
117
- expect ( replay . getOptions ( ) . errorSampleRate ) . toBe ( 0.5 ) ;
118
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
119
- } ) ;
120
-
121
- it ( 'works with defining 0 in integration' , async ( ) => {
122
- const { replay } = await mockSdk ( {
123
- replayOptions : { errorSampleRate : 0 } ,
124
- sentryOptions : { replaysOnErrorSampleRate : undefined } ,
125
- } ) ;
126
-
127
- expect ( replay . getOptions ( ) . errorSampleRate ) . toBe ( 0 ) ;
128
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
129
- } ) ;
130
-
131
71
it ( 'works with defining settings in SDK' , async ( ) => {
132
72
const { replay } = await mockSdk ( { sentryOptions : { replaysOnErrorSampleRate : 0.5 } , replayOptions : { } } ) ;
133
73
@@ -141,26 +81,6 @@ describe('Integration | integrationSettings', () => {
141
81
expect ( replay . getOptions ( ) . errorSampleRate ) . toBe ( 0 ) ;
142
82
expect ( mockConsole ) . toBeCalledTimes ( 0 ) ;
143
83
} ) ;
144
-
145
- it ( 'SDK option takes precedence' , async ( ) => {
146
- const { replay } = await mockSdk ( {
147
- sentryOptions : { replaysOnErrorSampleRate : 0.5 } ,
148
- replayOptions : { errorSampleRate : 0.1 } ,
149
- } ) ;
150
-
151
- expect ( replay . getOptions ( ) . errorSampleRate ) . toBe ( 0.5 ) ;
152
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
153
- } ) ;
154
-
155
- it ( 'SDK option takes precedence even when 0' , async ( ) => {
156
- const { replay } = await mockSdk ( {
157
- sentryOptions : { replaysOnErrorSampleRate : 0 } ,
158
- replayOptions : { errorSampleRate : 0.1 } ,
159
- } ) ;
160
-
161
- expect ( replay . getOptions ( ) . errorSampleRate ) . toBe ( 0 ) ;
162
- expect ( mockConsole ) . toBeCalledTimes ( 1 ) ;
163
- } ) ;
164
84
} ) ;
165
85
166
86
describe ( 'all sample rates' , ( ) => {
0 commit comments