File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,11 @@ yargs( process.argv.slice( 2 ) )
190
190
"Pass multiple by repeating the option."
191
191
} ) ;
192
192
} ,
193
- handler : async ( { baseUrl , configFile, quiet, ...argv } ) => {
193
+ handler : async ( { configFile, quiet, ...argv } ) => {
194
194
console . log ( "Starting server..." ) ;
195
195
const config = await readYAML ( configFile ) ;
196
196
const middleware = await parseMiddleware ( config , argv ) ;
197
+ const baseUrl = config . baseUrl ?? argv . baseUrl ?? "/test/" ;
197
198
198
199
/**
199
200
* Run a simple server for loading tests in a browser.
Original file line number Diff line number Diff line change @@ -35,14 +35,6 @@ export async function run( {
35
35
runId,
36
36
verbose
37
37
} ) {
38
- if ( ! baseUrl ) {
39
- throw new Error ( "No baseUrl specified." ) ;
40
- }
41
-
42
- // Ensure baseUrl ends with a slash
43
- if ( ! rendsWithSlash . test ( baseUrl ) ) {
44
- baseUrl += "/" ;
45
- }
46
38
if ( ! browserNames . length ) {
47
39
browserNames = [ "chrome" ] ;
48
40
}
@@ -52,6 +44,11 @@ export async function run( {
52
44
) ;
53
45
}
54
46
47
+ // Ensure baseUrl ends with a slash
48
+ if ( ! rendsWithSlash . test ( baseUrl ) ) {
49
+ baseUrl += "/" ;
50
+ }
51
+
55
52
if ( verbose ) {
56
53
console . log ( browserstack ? "Running in BrowserStack." : "Running locally." ) ;
57
54
}
You can’t perform that action at this time.
0 commit comments