@@ -9,11 +9,11 @@ describe('`Transaction` class', () => {
9
9
expect ( transaction . metadata . source ) . toEqual ( 'route' ) ;
10
10
} ) ;
11
11
12
- it ( "doesn't set source in constructor if not provided" , ( ) => {
12
+ it ( "sets source to be `'custom'` in constructor if not provided" , ( ) => {
13
13
const transaction = new Transaction ( { name : 'dogpark' } ) ;
14
14
15
15
expect ( transaction . name ) . toEqual ( 'dogpark' ) ;
16
- expect ( transaction . metadata . source ) . toBeUndefined ( ) ;
16
+ expect ( transaction . metadata . source ) . toBe ( 'custom' ) ;
17
17
} ) ;
18
18
19
19
it ( "sets source to `'custom'` when assigning to `name` property" , ( ) => {
@@ -25,14 +25,14 @@ describe('`Transaction` class', () => {
25
25
} ) ;
26
26
27
27
it ( 'updates transaction name changes with correct variables needed' , ( ) => {
28
- const transaction = new Transaction ( { name : 'dogpark' } ) ;
28
+ const transaction = new Transaction ( { name : 'dogpark' , metadata : { source : 'url' } } ) ;
29
29
expect ( transaction . metadata . changes ) . toEqual ( [ ] ) ;
30
30
31
31
transaction . name = 'ballpit' ;
32
32
33
33
expect ( transaction . metadata . changes ) . toEqual ( [
34
34
{
35
- source : 'custom ' ,
35
+ source : 'url ' ,
36
36
timestamp : expect . any ( Number ) ,
37
37
propagations : 0 ,
38
38
} ,
@@ -42,7 +42,7 @@ describe('`Transaction` class', () => {
42
42
43
43
expect ( transaction . metadata . changes ) . toEqual ( [
44
44
{
45
- source : 'custom ' ,
45
+ source : 'url ' ,
46
46
timestamp : expect . any ( Number ) ,
47
47
propagations : 0 ,
48
48
} ,
@@ -52,7 +52,7 @@ describe('`Transaction` class', () => {
52
52
53
53
expect ( transaction . metadata . changes ) . toEqual ( [
54
54
{
55
- source : 'custom ' ,
55
+ source : 'url ' ,
56
56
timestamp : expect . any ( Number ) ,
57
57
propagations : 0 ,
58
58
} ,
@@ -68,7 +68,7 @@ describe('`Transaction` class', () => {
68
68
69
69
expect ( transaction . metadata . changes ) . toEqual ( [
70
70
{
71
- source : 'custom ' ,
71
+ source : 'url ' ,
72
72
timestamp : expect . any ( Number ) ,
73
73
propagations : 0 ,
74
74
} ,
@@ -78,7 +78,7 @@ describe('`Transaction` class', () => {
78
78
propagations : 3 ,
79
79
} ,
80
80
{
81
- source : 'route ' ,
81
+ source : 'custom ' ,
82
82
timestamp : expect . any ( Number ) ,
83
83
propagations : 3 ,
84
84
} ,
@@ -140,14 +140,14 @@ describe('`Transaction` class', () => {
140
140
} ) ;
141
141
142
142
it ( 'updates transaction name changes with correct variables needed' , ( ) => {
143
- const transaction = new Transaction ( { name : 'dogpark' } ) ;
143
+ const transaction = new Transaction ( { name : 'dogpark' , metadata : { source : 'url' } } ) ;
144
144
expect ( transaction . metadata . changes ) . toEqual ( [ ] ) ;
145
145
146
146
transaction . name = 'ballpit' ;
147
147
148
148
expect ( transaction . metadata . changes ) . toEqual ( [
149
149
{
150
- source : 'custom ' ,
150
+ source : 'url ' ,
151
151
timestamp : expect . any ( Number ) ,
152
152
propagations : 0 ,
153
153
} ,
@@ -157,7 +157,7 @@ describe('`Transaction` class', () => {
157
157
158
158
expect ( transaction . metadata . changes ) . toEqual ( [
159
159
{
160
- source : 'custom ' ,
160
+ source : 'url ' ,
161
161
timestamp : expect . any ( Number ) ,
162
162
propagations : 0 ,
163
163
} ,
@@ -167,12 +167,12 @@ describe('`Transaction` class', () => {
167
167
168
168
expect ( transaction . metadata . changes ) . toEqual ( [
169
169
{
170
- source : 'custom ' ,
170
+ source : 'url ' ,
171
171
timestamp : expect . any ( Number ) ,
172
172
propagations : 0 ,
173
173
} ,
174
174
{
175
- source : 'task ' ,
175
+ source : 'custom ' ,
176
176
timestamp : expect . any ( Number ) ,
177
177
propagations : 3 ,
178
178
} ,
0 commit comments