@@ -47,7 +47,7 @@ describe('createTransport', () => {
47
47
expect ( req . body ) . toEqual ( serializeEnvelope ( ERROR_ENVELOPE ) ) ;
48
48
return resolvedSyncPromise ( { statusCode : 200 , reason : 'OK' } ) ;
49
49
} ) ;
50
- const res = await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
50
+ const res = await transport . send ( ERROR_ENVELOPE ) ;
51
51
expect ( res . status ) . toBe ( 'success' ) ;
52
52
expect ( res . reason ) . toBe ( 'OK' ) ;
53
53
} ) ;
@@ -59,7 +59,7 @@ describe('createTransport', () => {
59
59
return resolvedSyncPromise ( { statusCode : 400 , reason : 'Bad Request' } ) ;
60
60
} ) ;
61
61
try {
62
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
62
+ await transport . send ( ERROR_ENVELOPE ) ;
63
63
} catch ( res ) {
64
64
expect ( res . status ) . toBe ( 'invalid' ) ;
65
65
expect ( res . reason ) . toBe ( 'Bad Request' ) ;
@@ -73,7 +73,7 @@ describe('createTransport', () => {
73
73
return resolvedSyncPromise ( { statusCode : 500 } ) ;
74
74
} ) ;
75
75
try {
76
- await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
76
+ await transport . send ( TRANSACTION_ENVELOPE ) ;
77
77
} catch ( res ) {
78
78
expect ( res . status ) . toBe ( 'failed' ) ;
79
79
expect ( res . reason ) . toBe ( 'Unknown transport error' ) ;
@@ -135,7 +135,7 @@ describe('createTransport', () => {
135
135
} ) ;
136
136
137
137
try {
138
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
138
+ await transport . send ( ERROR_ENVELOPE ) ;
139
139
} catch ( res ) {
140
140
expect ( res . status ) . toBe ( 'rate_limit' ) ;
141
141
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
@@ -144,13 +144,13 @@ describe('createTransport', () => {
144
144
setTransportResponse ( { statusCode : 200 } ) ;
145
145
146
146
try {
147
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
147
+ await transport . send ( ERROR_ENVELOPE ) ;
148
148
} catch ( res ) {
149
149
expect ( res . status ) . toBe ( 'rate_limit' ) ;
150
150
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
151
151
}
152
152
153
- const res = await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
153
+ const res = await transport . send ( ERROR_ENVELOPE ) ;
154
154
expect ( res . status ) . toBe ( 'success' ) ;
155
155
} ) ;
156
156
@@ -181,7 +181,7 @@ describe('createTransport', () => {
181
181
} ) ;
182
182
183
183
try {
184
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
184
+ await transport . send ( ERROR_ENVELOPE ) ;
185
185
} catch ( res ) {
186
186
expect ( res . status ) . toBe ( 'rate_limit' ) ;
187
187
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
@@ -190,20 +190,20 @@ describe('createTransport', () => {
190
190
setTransportResponse ( { statusCode : 200 } ) ;
191
191
192
192
try {
193
- await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
193
+ await transport . send ( TRANSACTION_ENVELOPE ) ;
194
194
} catch ( res ) {
195
195
expect ( res . status ) . toBe ( 'rate_limit' ) ;
196
196
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
197
197
}
198
198
199
199
try {
200
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
200
+ await transport . send ( ERROR_ENVELOPE ) ;
201
201
} catch ( res ) {
202
202
expect ( res . status ) . toBe ( 'rate_limit' ) ;
203
203
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
204
204
}
205
205
206
- const res = await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
206
+ const res = await transport . send ( TRANSACTION_ENVELOPE ) ;
207
207
expect ( res . status ) . toBe ( 'success' ) ;
208
208
} ) ;
209
209
@@ -234,21 +234,21 @@ describe('createTransport', () => {
234
234
} ) ;
235
235
236
236
try {
237
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
237
+ await transport . send ( ERROR_ENVELOPE ) ;
238
238
} catch ( res ) {
239
239
expect ( res . status ) . toBe ( 'rate_limit' ) ;
240
240
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
241
241
}
242
242
243
243
try {
244
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
244
+ await transport . send ( ERROR_ENVELOPE ) ;
245
245
} catch ( res ) {
246
246
expect ( res . status ) . toBe ( 'rate_limit' ) ;
247
247
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
248
248
}
249
249
250
250
try {
251
- await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
251
+ await transport . send ( TRANSACTION_ENVELOPE ) ;
252
252
} catch ( res ) {
253
253
expect ( res . status ) . toBe ( 'rate_limit' ) ;
254
254
expect ( res . reason ) . toBe (
@@ -258,10 +258,10 @@ describe('createTransport', () => {
258
258
259
259
setTransportResponse ( { statusCode : 200 } ) ;
260
260
261
- const eventRes = await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
261
+ const eventRes = await transport . send ( ERROR_ENVELOPE ) ;
262
262
expect ( eventRes . status ) . toBe ( 'success' ) ;
263
263
264
- const transactionRes = await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
264
+ const transactionRes = await transport . send ( TRANSACTION_ENVELOPE ) ;
265
265
expect ( transactionRes . status ) . toBe ( 'success' ) ;
266
266
} ) ;
267
267
@@ -296,21 +296,21 @@ describe('createTransport', () => {
296
296
} ) ;
297
297
298
298
try {
299
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
299
+ await transport . send ( ERROR_ENVELOPE ) ;
300
300
} catch ( res ) {
301
301
expect ( res . status ) . toBe ( 'rate_limit' ) ;
302
302
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
303
303
}
304
304
305
305
try {
306
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
306
+ await transport . send ( ERROR_ENVELOPE ) ;
307
307
} catch ( res ) {
308
308
expect ( res . status ) . toBe ( 'rate_limit' ) ;
309
309
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
310
310
}
311
311
312
312
try {
313
- await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
313
+ await transport . send ( TRANSACTION_ENVELOPE ) ;
314
314
} catch ( res ) {
315
315
expect ( res . status ) . toBe ( 'rate_limit' ) ;
316
316
expect ( res . reason ) . toBe (
@@ -320,10 +320,10 @@ describe('createTransport', () => {
320
320
321
321
setTransportResponse ( { statusCode : 200 } ) ;
322
322
323
- const eventRes = await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
323
+ const eventRes = await transport . send ( ERROR_ENVELOPE ) ;
324
324
expect ( eventRes . status ) . toBe ( 'success' ) ;
325
325
326
- const transactionRes = await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
326
+ const transactionRes = await transport . send ( TRANSACTION_ENVELOPE ) ;
327
327
expect ( transactionRes . status ) . toBe ( 'success' ) ;
328
328
} ) ;
329
329
@@ -352,14 +352,14 @@ describe('createTransport', () => {
352
352
} ) ;
353
353
354
354
try {
355
- await transport . send ( ERROR_ENVELOPE , ERROR_TRANSPORT_CATEGORY ) ;
355
+ await transport . send ( ERROR_ENVELOPE ) ;
356
356
} catch ( res ) {
357
357
expect ( res . status ) . toBe ( 'rate_limit' ) ;
358
358
expect ( res . reason ) . toBe ( `Too many error requests, backing off until: ${ new Date ( afterLimit ) . toISOString ( ) } ` ) ;
359
359
}
360
360
361
361
try {
362
- await transport . send ( TRANSACTION_ENVELOPE , TRANSACTION_TRANSPORT_CATEGORY ) ;
362
+ await transport . send ( TRANSACTION_ENVELOPE ) ;
363
363
} catch ( res ) {
364
364
expect ( res . status ) . toBe ( 'rate_limit' ) ;
365
365
expect ( res . reason ) . toBe (
0 commit comments