File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2828 },
2929 "dependencies" : {
3030 "@optimizely/js-sdk-logging" : " ^0.1.0" ,
31- "@optimizely/optimizely-sdk" : " 3.3.2 " ,
31+ "@optimizely/optimizely-sdk" : " 3.4.1 " ,
3232 "hoist-non-react-statics" : " ^3.3.0" ,
3333 "prop-types" : " ^15.6.2" ,
3434 "utility-types" : " ^2.1.0"
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ describe('ReactSDKClient', () => {
4040 getFeatureVariableDouble : jest . fn ( ( ) => null ) ,
4141 getFeatureVariableInteger : jest . fn ( ( ) => null ) ,
4242 getFeatureVariableString : jest . fn ( ( ) => null ) ,
43+ getOptimizelyConfig : jest . fn ( ( ) => null ) ,
4344 onReady : jest . fn ( ( ) => Promise . resolve ( { success : false } ) ) ,
4445 close : jest . fn ( ) ,
4546 notificationCenter : {
Original file line number Diff line number Diff line change 11/**
2- * Copyright 2019, Optimizely
2+ * Copyright 2019-2020 , Optimizely
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -99,6 +99,8 @@ export interface ReactSDKClient extends optimizely.Client {
9999 overrideAttributes ?: optimizely . UserAttributes ,
100100 ) : Array < string >
101101
102+ getOptimizelyConfig ( ) : optimizely . OptimizelyConfig | null ;
103+
102104 track (
103105 eventKey : string ,
104106 overrideUserId ?: string | optimizely . EventTags ,
@@ -578,6 +580,14 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
578580 return this . _client . setForcedVariation ( experiment , finalUserId , finalVariationKey )
579581 }
580582
583+ /**
584+ * Returns OptimizelyConfig object containing experiments and features data
585+ * @returns {optimizely.OptimizelyConfig | null } optimizely config
586+ */
587+ public getOptimizelyConfig ( ) : optimizely . OptimizelyConfig | null {
588+ return this . _client . getOptimizelyConfig ( )
589+ }
590+
581591 /**
582592 * Cleanup method for killing an running timers and flushing eventQueue
583593 */
You can’t perform that action at this time.
0 commit comments