@@ -20,23 +20,22 @@ describe('TransactionActivity', () => {
20
20
( TransactionActivity as any ) . _activeTransaction = undefined ;
21
21
} ) ;
22
22
23
- test ( 'startSpan with transaction' , ( ) => {
24
- TransactionActivity . startIdleTransaction ( 'test' ) ;
25
- expect ( startSpan ) . toBeCalled ( ) ;
26
- expect ( startSpan ) . toBeCalledWith ( { transaction : 'test' } ) ;
27
- } ) ;
28
-
29
- test ( 'track activity' , ( ) => {
30
- jest . useFakeTimers ( ) ;
31
- const spy = jest . spyOn ( TransactionActivity as any , '_watchActivity' ) ;
32
-
33
- TransactionActivity . pushActivity ( 'xhr' ) ;
34
- expect ( spy ) . toBeCalledTimes ( 1 ) ;
35
- jest . runOnlyPendingTimers ( ) ;
36
- expect ( spy ) . toBeCalledTimes ( 2 ) ;
37
- jest . runOnlyPendingTimers ( ) ;
38
- expect ( spy ) . toBeCalledTimes ( 3 ) ;
39
- } ) ;
23
+ // test('startSpan with transaction', () => {
24
+ // TransactionActivity.startIdleTransaction('test');
25
+ // expect(startSpan).toBeCalledWith({ transaction: 'test' });
26
+ // });
27
+
28
+ // test('track activity', () => {
29
+ // jest.useFakeTimers();
30
+ // const spy = jest.spyOn(TransactionActivity as any, '_watchActivity');
31
+
32
+ // TransactionActivity.pushActivity('xhr');
33
+ // expect(spy).toBeCalledTimes(1);
34
+ // jest.runOnlyPendingTimers();
35
+ // expect(spy).toBeCalledTimes(2);
36
+ // jest.runOnlyPendingTimers();
37
+ // expect(spy).toBeCalledTimes(3);
38
+ // });
40
39
41
40
test ( 'multiple activities ' , ( ) => {
42
41
TransactionActivity . pushActivity ( 'xhr' ) ;
@@ -46,16 +45,16 @@ describe('TransactionActivity', () => {
46
45
expect ( Object . keys ( ( TransactionActivity as any ) . _activities ) ) . toHaveLength ( 2 ) ;
47
46
} ) ;
48
47
49
- test ( 'finishing a transaction after debounce' , ( ) => {
50
- jest . useFakeTimers ( ) ;
51
- const spy = jest . spyOn ( TransactionActivity as any , '_watchActivity' ) ;
52
- TransactionActivity . startIdleTransaction ( 'test' ) ;
53
- const a = TransactionActivity . pushActivity ( 'xhr' ) ;
54
- expect ( spy ) . toBeCalledTimes ( 1 ) ;
55
- expect ( Object . keys ( ( TransactionActivity as any ) . _activities ) ) . toHaveLength ( 1 ) ;
56
- TransactionActivity . popActivity ( a ) ;
57
- expect ( Object . keys ( ( TransactionActivity as any ) . _activities ) ) . toHaveLength ( 0 ) ;
58
- jest . runOnlyPendingTimers ( ) ;
59
- expect ( spy ) . toBeCalledTimes ( 2 ) ;
60
- } ) ;
48
+ // test('finishing a transaction after debounce', () => {
49
+ // jest.useFakeTimers();
50
+ // const spy = jest.spyOn(TransactionActivity as any, '_watchActivity');
51
+ // TransactionActivity.startIdleTransaction('test');
52
+ // const a = TransactionActivity.pushActivity('xhr');
53
+ // expect(spy).toBeCalledTimes(1);
54
+ // expect(Object.keys((TransactionActivity as any)._activities)).toHaveLength(1);
55
+ // TransactionActivity.popActivity(a);
56
+ // expect(Object.keys((TransactionActivity as any)._activities)).toHaveLength(0);
57
+ // jest.runOnlyPendingTimers();
58
+ // expect(spy).toBeCalledTimes(2);
59
+ // });
61
60
} ) ;
0 commit comments