mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
22 lines
447 B
JavaScript
22 lines
447 B
JavaScript
|
export function buildTestUrl( suite, { jquery, migrate, port, reportId } ) {
|
||
|
if ( !port ) {
|
||
|
throw new Error( "No port specified." );
|
||
|
}
|
||
|
|
||
|
const query = new URLSearchParams();
|
||
|
|
||
|
if ( jquery ) {
|
||
|
query.append( "jquery", jquery );
|
||
|
}
|
||
|
|
||
|
if ( migrate ) {
|
||
|
query.append( "migrate", "true" );
|
||
|
}
|
||
|
|
||
|
if ( reportId ) {
|
||
|
query.append( "reportId", reportId );
|
||
|
}
|
||
|
|
||
|
return `http://localhost:${ port }/tests/unit/${ suite }/${ suite }.html?${ query }`;
|
||
|
}
|