diff options
author | Timmy Willison <timmywil@users.noreply.github.com> | 2024-04-09 13:31:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 13:31:27 -0400 |
commit | 4af5caed7a16cc0aca6b8f2b65ab0d697df139eb (patch) | |
tree | 6986a82205fa38ac5139cacb1b3fb22200c9a089 /tests/runner/lib/buildTestUrl.js | |
parent | 213fdbaa285158a21546b3edcb912275fed4a334 (diff) | |
download | jquery-ui-4af5caed7a16cc0aca6b8f2b65ab0d697df139eb.tar.gz jquery-ui-4af5caed7a16cc0aca6b8f2b65ab0d697df139eb.zip |
Tests: align test runner with other repos
Close gh-2234
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 }`; } |