From 919f20da3dcc178854083f7319cc1b39a45aa782 Mon Sep 17 00:00:00 2001 From: moritzraho Date: Wed, 19 Jun 2024 12:06:10 +0200 Subject: [PATCH] fix: error on apac --- lib/constants.js | 2 +- test/AdobeState.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index 90e755c..918fb7a 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -24,8 +24,8 @@ const ENDPOINT_STAGE_INTERNAL = 'https://storage-state-.stg.app-builder. const ALLOWED_REGIONS = [ // first region is the default region 'amer', - 'apac', 'emea' + // soon to come: 'apac' ] // can be overwritten by env diff --git a/test/AdobeState.test.js b/test/AdobeState.test.js index c145b88..5265dbe 100644 --- a/test/AdobeState.test.js +++ b/test/AdobeState.test.js @@ -547,7 +547,7 @@ describe('private methods', () => { }) test('no params, region set', async () => { - const region = 'apac' + const region = 'emea' const env = PROD_ENV mockCLIEnv.mockReturnValue(env) @@ -564,7 +564,7 @@ describe('private methods', () => { mockCLIEnv.mockReturnValue(env) await expect(AdobeState.init({ ...fakeCredentials, region })).rejects - .toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, apac, emea') + .toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea') }) }) @@ -608,7 +608,7 @@ describe('private methods', () => { jest.resetModules() process.env.AIO_STATE_ENDPOINT = 'https://custom.abc.com' const env = STAGE_ENV - const region = 'apac' + const region = 'amer' mockCLIEnv.mockReturnValue(env) // need to instantiate a new store, when env changes