@@ -27,6 +27,7 @@ describe('NodeClient', () => {
27
27
const requestSession = scope . getRequestSession ( ) ;
28
28
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
29
29
} ) ;
30
+
30
31
test ( 'when autoSessionTracking is disabled -> requestStatus should not be set' , ( ) => {
31
32
const options = getDefaultNodeClientOptions ( { dsn : PUBLIC_DSN , autoSessionTracking : false , release : '1.4' } ) ;
32
33
client = new NodeClient ( options ) ;
@@ -42,6 +43,7 @@ describe('NodeClient', () => {
42
43
const requestSession = scope . getRequestSession ( ) ;
43
44
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
44
45
} ) ;
46
+
45
47
test ( 'when autoSessionTracking is enabled + requestSession status is Crashed -> requestStatus should not be overridden' , ( ) => {
46
48
const options = getDefaultNodeClientOptions ( { dsn : PUBLIC_DSN , autoSessionTracking : true , release : '1.4' } ) ;
47
49
client = new NodeClient ( options ) ;
@@ -57,6 +59,7 @@ describe('NodeClient', () => {
57
59
const requestSession = scope . getRequestSession ( ) ;
58
60
expect ( requestSession ! . status ) . toEqual ( 'crashed' ) ;
59
61
} ) ;
62
+
60
63
test ( 'when autoSessionTracking is enabled + error occurs within request bounds -> requestStatus should be set to Errored' , ( ) => {
61
64
const options = getDefaultNodeClientOptions ( { dsn : PUBLIC_DSN , autoSessionTracking : true , release : '1.4' } ) ;
62
65
client = new NodeClient ( options ) ;
@@ -72,6 +75,7 @@ describe('NodeClient', () => {
72
75
const requestSession = scope . getRequestSession ( ) ;
73
76
expect ( requestSession ! . status ) . toEqual ( 'errored' ) ;
74
77
} ) ;
78
+
75
79
test ( 'when autoSessionTracking is enabled + error occurs outside of request bounds -> requestStatus should not be set to Errored' , ( ) => {
76
80
const options = getDefaultNodeClientOptions ( { dsn : PUBLIC_DSN , autoSessionTracking : true , release : '1.4' } ) ;
77
81
client = new NodeClient ( options ) ;
0 commit comments