diff --git a/src/client/eppo-client-with-bandits.spec.ts b/src/client/eppo-client-with-bandits.spec.ts index 1000427..33f938e 100644 --- a/src/client/eppo-client-with-bandits.spec.ts +++ b/src/client/eppo-client-with-bandits.spec.ts @@ -61,7 +61,7 @@ describe('EppoClient Bandits E2E test', () => { }); beforeEach(() => { - client = new EppoClient(flagStore, undefined, false, banditFlagStore, banditModelStore); + client = new EppoClient(flagStore, banditFlagStore, banditModelStore, undefined, false); client.setIsGracefulFailureMode(false); client.setAssignmentLogger({ logAssignment: mockLogAssignment }); client.setBanditLogger({ logBanditAction: mockLogBanditAction }); diff --git a/src/client/eppo-client.spec.ts b/src/client/eppo-client.spec.ts index 24b7271..fef6270 100644 --- a/src/client/eppo-client.spec.ts +++ b/src/client/eppo-client.spec.ts @@ -269,7 +269,7 @@ describe('EppoClient E2E test', () => { it.each(readTestData(ASSIGNMENT_TEST_DATA_DIR))( 'test variation assignment splits', async ({ flag, variationType, defaultValue, subjects }: IAssignmentTestCase) => { - const client = new EppoClient(storage, undefined, true); + const client = new EppoClient(storage, undefined, undefined, undefined, true); client.setIsGracefulFailureMode(false); const typeAssignmentFunctions = { @@ -622,7 +622,7 @@ describe('EppoClient E2E test', () => { }); it('Fetches initial configuration with parameters in constructor', async () => { - client = new EppoClient(thisFlagStorage, requestConfiguration); + client = new EppoClient(thisFlagStorage, undefined, undefined, requestConfiguration); client.setIsGracefulFailureMode(false); // no configuration loaded let variation = client.getNumericAssignment(flagKey, subject, {}, 123.4); @@ -653,7 +653,7 @@ describe('EppoClient E2E test', () => { } } - client = new EppoClient(new MockStore(), requestConfiguration); + client = new EppoClient(new MockStore(), undefined, undefined, requestConfiguration); client.setIsGracefulFailureMode(false); // no configuration loaded let variation = client.getNumericAssignment(flagKey, subject, {}, 0.0); @@ -695,7 +695,7 @@ describe('EppoClient E2E test', () => { ...requestConfiguration, pollAfterSuccessfulInitialization, }; - client = new EppoClient(thisFlagStorage, requestConfiguration); + client = new EppoClient(thisFlagStorage, undefined, undefined, requestConfiguration); client.setIsGracefulFailureMode(false); // no configuration loaded let variation = client.getNumericAssignment(flagKey, subject, {}, 0.0); @@ -760,7 +760,7 @@ describe('EppoClient E2E test', () => { throwOnFailedInitialization, pollAfterFailedInitialization, }; - client = new EppoClient(thisFlagStorage, requestConfiguration); + client = new EppoClient(thisFlagStorage, undefined, undefined, requestConfiguration); client.setIsGracefulFailureMode(false); // no configuration loaded expect(client.getNumericAssignment(flagKey, subject, {}, 0.0)).toBe(0.0); diff --git a/src/client/eppo-client.ts b/src/client/eppo-client.ts index 5ca5570..c7b95d2 100644 --- a/src/client/eppo-client.ts +++ b/src/client/eppo-client.ts @@ -205,11 +205,10 @@ export default class EppoClient implements IEppoClient { constructor( private flagConfigurationStore: IConfigurationStore, - private configurationRequestParameters?: FlagConfigurationRequestParameters, - private isObfuscated = false, - // Parameter order is for backwards compatibility, and thus related items are not grouped private banditFlagConfigurationStore?: IConfigurationStore, private banditModelConfigurationStore?: IConfigurationStore, + private configurationRequestParameters?: FlagConfigurationRequestParameters, + private isObfuscated = false, ) {} public setConfigurationRequestParameters(