jquery-ui/tests/runner/lib/buildTestUrl.js
Timmy Willison 91df20be6b
Tests: replace grunt-contrib-qunit with jQuery test runner
- add filestash workflow

Close gh-2221
2024-03-29 09:13:46 -04:00

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 }`;
}