@@ -9,13 +9,15 @@ function getFullPath(path: string): string {
99type CustomTestRunnerConfig = Options . Testrunner & { dockerInstance ?: DockerWrapper } ;
1010
1111export const config : Omit < Options . Testrunner , 'capabilities' > = {
12- specs : [ [
13- getFullPath ( 'test/functional/*.test.ts' ) ,
14- getFullPath ( 'test/integration/*.test.ts' ) ,
15- getFullPath ( 'test/media/media.test.ts' ) ,
16- getFullPath ( 'test/performance/*.test.ts' ) ,
17- // YouTube and Vimeo tests are disabled since they block SauceLabs on CI
18- ] ] ,
12+ specs : [
13+ [
14+ getFullPath ( 'test/functional/*.test.ts' ) ,
15+ getFullPath ( 'test/integration/*.test.ts' ) ,
16+ getFullPath ( 'test/media/media.test.ts' ) ,
17+ getFullPath ( 'test/performance/*.test.ts' ) ,
18+ // YouTube and Vimeo tests are disabled since they block SauceLabs on CI
19+ ] ,
20+ ] ,
1921 logLevel : 'warn' ,
2022 baseUrl : 'http://snowplow-js-tracker.local:8080' ,
2123 waitforTimeout : 30000 ,
@@ -31,7 +33,11 @@ export const config: Omit<Options.Testrunner, 'capabilities'> = {
3133 defaultTimeoutInterval : 120000 ,
3234 } ,
3335 async onPrepare ( config : CustomTestRunnerConfig ) {
34- const isSauce = config . services ?. some ( ( service ) => Array . isArray ( service ) && service [ 0 ] === 'sauce' ) ;
36+ // Tolerate both the `'sauce'` and `['sauce', opts]` service forms, since Micro must be
37+ // advertised under the tunnel hostname rather than loopback whenever tests run on Sauce.
38+ const isSauce = config . services ?. some ( ( service ) =>
39+ Array . isArray ( service ) ? service [ 0 ] === 'sauce' : service === 'sauce'
40+ ) ;
3541 config . dockerInstance = await start ( isSauce ) ;
3642 await setValue ( 'dockerInstanceUrl' , config . dockerInstance . url ) ;
3743 return ;
0 commit comments