@@ -68,7 +68,12 @@ describe('LaunchDarklyClientProvider', () => {
68
68
69
69
const provider = new LaunchDarklyClientProvider ( envKey , { logger, ...ldOptionsMock } ) ;
70
70
71
- expect ( provider [ 'ldOptions' ] ) . toStrictEqual ( { ...ldOptionsMock , logger } ) ;
71
+ expect ( provider [ 'ldOptions' ] ) . toStrictEqual ( {
72
+ ...ldOptionsMock ,
73
+ logger,
74
+ wrapperName : 'open-feature-community-js-client' ,
75
+ wrapperVersion : expect . any ( String ) ,
76
+ } ) ;
72
77
} ) ;
73
78
} ) ;
74
79
@@ -81,7 +86,15 @@ describe('LaunchDarklyClientProvider', () => {
81
86
await provider . initialize ( ) ;
82
87
expect ( initialize ) . toHaveBeenCalledTimes ( 1 ) ;
83
88
/* when not set in open feauture LD sdk initialize should be called with the anonymous context*/
84
- expect ( initialize ) . toHaveBeenCalledWith ( envKey , { anonymous : true } , { logger } ) ;
89
+ expect ( initialize ) . toHaveBeenCalledWith (
90
+ envKey ,
91
+ { anonymous : true } ,
92
+ {
93
+ logger,
94
+ wrapperName : 'open-feature-community-js-client' ,
95
+ wrapperVersion : expect . any ( String ) ,
96
+ } ,
97
+ ) ;
85
98
expect ( ldClientMock . waitForInitialization ) . toHaveBeenCalledWith ( undefined ) ;
86
99
} ) ;
87
100
@@ -90,7 +103,15 @@ describe('LaunchDarklyClientProvider', () => {
90
103
await provider . initialize ( ) ;
91
104
expect ( initialize ) . toHaveBeenCalledTimes ( 1 ) ;
92
105
/* when not set in open feauture LD sdk initialize should be called with the anonymous context*/
93
- expect ( initialize ) . toHaveBeenCalledWith ( envKey , { anonymous : true } , { logger } ) ;
106
+ expect ( initialize ) . toHaveBeenCalledWith (
107
+ envKey ,
108
+ { anonymous : true } ,
109
+ {
110
+ logger,
111
+ wrapperName : 'open-feature-community-js-client' ,
112
+ wrapperVersion : expect . any ( String ) ,
113
+ } ,
114
+ ) ;
94
115
expect ( ldClientMock . waitForInitialization ) . toHaveBeenCalledTimes ( 1 ) ;
95
116
expect ( ldClientMock . waitForInitialization ) . toHaveBeenCalledWith ( 5 ) ;
96
117
} ) ;
0 commit comments