Skip to content

Commit

Permalink
feat(int-1118): Add support for AP and CA region URLs in
Browse files Browse the repository at this point in the history
getRegionURL test
  • Loading branch information
Thiago Saife Rodrigues committed Dec 8, 2023
1 parent 318f401 commit 3b0b216
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/units/helpers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -117,4 +119,11 @@ describe('getRegionURL function', () => {
expect(helpers.getRegionURL('cn')).toEqual(CN_API_URL)
})

})
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)
})
})

0 comments on commit 3b0b216

Please sign in to comment.