From 3b0b2165db49ad4e0efff37c4349c0a65b52569c Mon Sep 17 00:00:00 2001 From: Thiago Saife Rodrigues Date: Fri, 8 Dec 2023 10:32:29 -0300 Subject: [PATCH] feat(int-1118): Add support for AP and CA region URLs in getRegionURL test --- tests/units/helpers.test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/units/helpers.test.js b/tests/units/helpers.test.js index 143f474e..b2e657d2 100644 --- a/tests/units/helpers.test.js +++ b/tests/units/helpers.test.js @@ -96,6 +96,8 @@ describe('getRegionURL function', () => { const EU_API_URL = 'api.storyblok.com' const US_API_URL = 'api-us.storyblok.com' const CN_API_URL = 'app.storyblokchina.cn' + const AP_API_URL = 'api-ap.storyblok.com' + const CA_API_URL = 'api-ca.storyblok.com' test('should return the europe url when pass a empty string', () => { expect(helpers.getRegionURL('')).toEqual(EU_API_URL) @@ -117,4 +119,11 @@ describe('getRegionURL function', () => { expect(helpers.getRegionURL('cn')).toEqual(CN_API_URL) }) -}) \ No newline at end of file + test('should return the australia url when pass ap string', () => { + expect(helpers.getRegionURL('ap')).toEqual(AP_API_URL) + }) + + test('should return the canada url when pass ca string', () => { + expect(helpers.getRegionURL('ca')).toEqual(CA_API_URL) + }) +})