@@ -13,7 +13,10 @@ import {
1313test ( 'daemon composition registers installed provider runtimes and their lazy platform modules' , async ( ) => {
1414 const { home, env } = pluginHome ( ) ;
1515 selectPlugin ( home , 'example' , 'example' , registrationSource ( 'example' ) ) ;
16- const composition = await createDaemonProviderRuntimeComposition ( env ) ;
16+ const composition = await createDaemonProviderRuntimeComposition ( {
17+ env : env ,
18+ cwd : process . cwd ( ) ,
19+ } ) ;
1720 const plugin = composition . runtimes . find ( ( runtime ) => runtime . provider === 'example' ) ;
1821 assert . ok ( plugin ) ;
1922 assert . equal (
@@ -26,7 +29,10 @@ test('daemon composition registers installed provider runtimes and their lazy pl
2629test ( 'built-in providers register ahead of the store and an unconfigured Limrun still claims its id' , async ( ) => {
2730 const { home, env } = pluginHome ( ) ;
2831 selectPlugin ( home , 'example' , 'example' , registrationSource ( 'example' ) ) ;
29- const composition = await createDaemonProviderRuntimeComposition ( env ) ;
32+ const composition = await createDaemonProviderRuntimeComposition ( {
33+ env : env ,
34+ cwd : process . cwd ( ) ,
35+ } ) ;
3036
3137 assert . deepEqual (
3238 composition . runtimes . map ( ( runtime ) => runtime . provider ) ,
@@ -47,10 +53,13 @@ test('daemon composition records Limrun as failed for a partial instance set and
4753 const { home, env } = pluginHome ( ) ;
4854 selectPlugin ( home , 'example' , 'example' , registrationSource ( 'example' ) ) ;
4955 const composition = await createDaemonProviderRuntimeComposition ( {
50- ...env ,
51- LIMRUN_API_KEY : 'lim_test_key' ,
52- LIM_ANDROID_INSTANCE_URL : 'https://region.limrun.example/v1/android_x/api' ,
53- LIM_ANDROID_INSTANCE_TOKEN : 'android-instance-token' ,
56+ env : {
57+ ...env ,
58+ LIMRUN_API_KEY : 'lim_test_key' ,
59+ LIM_ANDROID_INSTANCE_URL : 'https://region.limrun.example/v1/android_x/api' ,
60+ LIM_ANDROID_INSTANCE_TOKEN : 'android-instance-token' ,
61+ } ,
62+ cwd : process . cwd ( ) ,
5463 } ) ;
5564
5665 assert . deepEqual (
@@ -68,7 +77,10 @@ test('a plugin claiming a built-in provider ID is recorded as failed and the bui
6877 for ( const provider of [ 'limrun' , 'browserstack' , 'aws-device-farm' ] ) {
6978 const { home, env } = pluginHome ( ) ;
7079 selectPlugin ( home , 'example' , provider , 'throw new Error("must not evaluate");' ) ;
71- const composition = await createDaemonProviderRuntimeComposition ( env ) ;
80+ const composition = await createDaemonProviderRuntimeComposition ( {
81+ env : env ,
82+ cwd : process . cwd ( ) ,
83+ } ) ;
7284 const plugin = composition . inventory . find ( ( { package : name } ) => name === 'example' ) ;
7385 assert . equal ( plugin ?. state , 'failed' ) ;
7486 assert . equal ( plugin ?. error ?. reason , 'duplicate_provider' ) ;
@@ -85,8 +97,11 @@ test('Limrun stays unregistered when only the removed API key alias is configure
8597 const { env } = pluginHome ( ) ;
8698 const { runtimes, platformModules, inventory, shutdown } =
8799 await createDaemonProviderRuntimeComposition ( {
88- ...env ,
89- LIM_API_KEY : 'lim_test_key' ,
100+ env : {
101+ ...env ,
102+ LIM_API_KEY : 'lim_test_key' ,
103+ } ,
104+ cwd : process . cwd ( ) ,
90105 } ) ;
91106
92107 assert . equal (
@@ -104,8 +119,11 @@ test('Limrun stays unregistered when only the removed API key alias is configure
104119test ( 'Limrun registers when a Limrun API key is configured' , async ( ) => {
105120 const { env } = pluginHome ( ) ;
106121 const { runtimes, platformModules, shutdown } = await createDaemonProviderRuntimeComposition ( {
107- ...env ,
108- LIMRUN_API_KEY : 'lim_test_key' ,
122+ env : {
123+ ...env ,
124+ LIMRUN_API_KEY : 'lim_test_key' ,
125+ } ,
126+ cwd : process . cwd ( ) ,
109127 } ) ;
110128
111129 const limrun = runtimes . find ( ( runtime ) => runtime . provider === 'limrun' ) ;
@@ -118,9 +136,12 @@ test('Limrun registers when a Limrun API key is configured', async () => {
118136test ( 'Limrun registers for an existing instance without an API key' , async ( ) => {
119137 const { env } = pluginHome ( ) ;
120138 const { runtimes, platformModules, shutdown } = await createDaemonProviderRuntimeComposition ( {
121- ...env ,
122- LIM_IOS_INSTANCE_URL : 'https://region.limrun.example/v1/ios_x/api' ,
123- LIM_IOS_INSTANCE_TOKEN : 'ios-instance-token' ,
139+ env : {
140+ ...env ,
141+ LIM_IOS_INSTANCE_URL : 'https://region.limrun.example/v1/ios_x/api' ,
142+ LIM_IOS_INSTANCE_TOKEN : 'ios-instance-token' ,
143+ } ,
144+ cwd : process . cwd ( ) ,
124145 } ) ;
125146
126147 const limrun = runtimes . find ( ( runtime ) => runtime . provider === 'limrun' ) ;
@@ -167,7 +188,10 @@ test('composition shutdown is the only route the daemon uses: it shuts every run
167188 });` ,
168189 { selectionOptions : { log } } ,
169190 ) ;
170- const composition = await createDaemonProviderRuntimeComposition ( env ) ;
191+ const composition = await createDaemonProviderRuntimeComposition ( {
192+ env : env ,
193+ cwd : process . cwd ( ) ,
194+ } ) ;
171195 assert . ok ( composition . runtimes . some ( ( runtime ) => runtime . provider === 'cleaning' ) ) ;
172196
173197 await composition . shutdown ( ) ;
0 commit comments