diff options
Diffstat (limited to 'tests/runner/lib/buildTestUrl.js')
-rw-r--r-- | tests/runner/lib/buildTestUrl.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner/lib/buildTestUrl.js b/tests/runner/lib/buildTestUrl.js index 826548852..5eb3b049b 100644 --- a/tests/runner/lib/buildTestUrl.js +++ b/tests/runner/lib/buildTestUrl.js @@ -1,4 +1,4 @@ -export function buildTestUrl( suite, { jquery, migrate, port, reportId } ) { +export function buildTestUrl( suite, { browserstack, jquery, migrate, port, reportId } ) { if ( !port ) { throw new Error( "No port specified." ); } @@ -17,5 +17,8 @@ export function buildTestUrl( suite, { jquery, migrate, port, reportId } ) { query.append( "reportId", reportId ); } - return `http://localhost:${ port }/tests/unit/${ suite }/${ suite }.html?${ query }`; + // BrowserStack supplies a custom domain for local testing, + // which is especially necessary for iOS testing. + const host = browserstack ? "bs-local.com" : "localhost"; + return `http://${ host }:${ port }/tests/unit/${ suite }/${ suite }.html?${ query }`; } |