File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,29 @@ describe('Hub', () => {
28
28
jest . clearAllMocks ( ) ;
29
29
} ) ;
30
30
31
+ describe ( 'transaction creation' , ( ) => {
32
+ const hub = new Hub (
33
+ new BrowserClient ( {
34
+ dsn :
'https://[email protected] /12312012' ,
35
+ environment : 'dogpark' ,
36
+ release : 'off.leash.trail' ,
37
+ } ) ,
38
+ ) ;
39
+
40
+ it ( 'uses inherited values when given in transaction context' , ( ) => {
41
+ const transactionContext = {
42
+ name : 'FETCH /ball' ,
43
+ traceId : '12312012123120121231201212312012' ,
44
+ parentSpanId : '1121201211212012' ,
45
+ metadata : { tracestate : { sentry : 'sentry=doGsaREgReaT' , thirdparty : 'maisey=silly;charlie=goofy' } } ,
46
+ } ;
47
+
48
+ const transaction = hub . startTransaction ( transactionContext ) ;
49
+
50
+ expect ( transaction ) . toEqual ( expect . objectContaining ( transactionContext ) ) ;
51
+ } ) ;
52
+ } ) ;
53
+
31
54
describe ( 'getTransaction()' , ( ) => {
32
55
it ( 'should find a transaction which has been set on the scope if sampled = true' , ( ) => {
33
56
const hub = new Hub ( new BrowserClient ( { tracesSampleRate : 1 } ) ) ;
You can’t perform that action at this time.
0 commit comments