Skip to content

Commit

Permalink
fix headless endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Apr 11, 2019
1 parent 0ea4e2c commit 35affdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function createHMAC (username, key, jobId) {
*/
export function getSauceEndpoint (hostname, region, headless, protocol = 'https://') {
const dcRegion = REGION_MAPPING[region] ? region : 'us'
let locale = headless ? 'us-east1.headless.' : REGION_MAPPING[dcRegion]
let locale = headless ? 'us-east-1.' : REGION_MAPPING[dcRegion]
let subdomain = ''

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('getSauceEndpoint', () => {
expect(getSauceEndpoint('saucelabs.com', 'eu', false))
.toBe('https://eu-central-1.saucelabs.com')
expect(getSauceEndpoint('saucelabs.com', 'us', true))
.toBe('https://us-east1.headless.saucelabs.com')
.toBe('https://us-east-1.saucelabs.com')
expect(getSauceEndpoint('api.saucelabs.com', 'us', false))
.toBe('https://api.us-west-1.saucelabs.com')
expect(getSauceEndpoint('api.saucelabs.com', 'eu', false))
Expand Down

0 comments on commit 35affdd

Please sign in to comment.