Skip to content

Commit c3a6c85

Browse files
add ts-tests - update commons to 2.7.9-rc.3
1 parent 7842417 commit c3a6c85

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
6060
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
6161
"dependencies": {
62-
"@splitsoftware/splitio-commons": "2.7.9-rc.2",
62+
"@splitsoftware/splitio-commons": "2.7.9-rc.3",
6363
"tslib": "^2.3.1",
6464
"unfetch": "^4.2.0"
6565
},

ts-tests/index.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,14 @@ let fullBrowserSettings: SplitIO.IClientSideSettings = {
612612
getHeaderOverrides(context) { return { ...context.headers, 'header': 'value' }; },
613613
}
614614
},
615-
userConsent: 'GRANTED'
615+
userConsent: 'GRANTED',
616+
fallbackTreatments: {
617+
global: { treatment: 'global-treatment', config: '{"global": true}' },
618+
byFlag: {
619+
'my_flag': { treatment: 'flag-treatment', config: '{"flag": true}' },
620+
'my_other_flag': 'other-flag-treatment'
621+
}
622+
}
616623
};
617624
fullBrowserSettings.userConsent = 'DECLINED';
618625
fullBrowserSettings.userConsent = 'UNKNOWN';
@@ -657,7 +664,14 @@ let fullBrowserAsyncSettings: SplitIO.IClientSideAsyncSettings = {
657664
getHeaderOverrides(context) { return { ...context.headers, 'header': 'value' }; },
658665
}
659666
},
660-
userConsent: 'GRANTED'
667+
userConsent: 'GRANTED',
668+
fallbackTreatments: {
669+
global: 'global-treatment',
670+
byFlag: {
671+
'my_flag': { treatment: 'flag-treatment', config: '{"flag": true}' },
672+
'my_other_flag': 'other-flag-treatment'
673+
}
674+
}
661675
};
662676
fullBrowserAsyncSettings.mode = 'consumer_partial';
663677
fullBrowserAsyncSettings.userConsent = 'DECLINED';

0 commit comments

Comments
 (0)