@@ -12,8 +12,8 @@ import {version} from '../package.json';
1212
1313const context = github . context ;
1414
15- test ( 'no arguments' , ( ) => {
16- const { execArgs , failCi } = buildExec ( ) ;
15+ test ( 'no arguments' , async ( ) => {
16+ const opts = await buildExec ( ) ;
1717
1818 const args = [
1919 '-n' ,
@@ -24,12 +24,11 @@ test('no arguments', () => {
2424 if ( context . eventName == 'pull_request' ) {
2525 args . push ( '-C' , `${ context . payload . pull_request . head . sha } ` ) ;
2626 }
27-
28- expect ( execArgs ) . toEqual ( args ) ;
29- expect ( failCi ) . toBeFalsy ( ) ;
27+ expect ( opts . execArgs ) . toEqual ( args ) ;
28+ expect ( opts . failCi ) . toBeFalsy ( ) ;
3029} ) ;
3130
32- test ( 'all arguments' , ( ) => {
31+ test ( 'all arguments' , async ( ) => {
3332 const envs = {
3433 'commit_parent' : '83231650328f11695dfb754ca0f540516f188d27' ,
3534 'directory' : 'coverage/' ,
@@ -72,8 +71,8 @@ test('all arguments', () => {
7271 process . env [ 'INPUT_' + env . toUpperCase ( ) ] = envs [ env ] ;
7372 }
7473
75- const { execArgs , failCi } = buildExec ( ) ;
76- expect ( execArgs ) . toEqual ( [
74+ const opts = await buildExec ( ) ;
75+ expect ( opts . execArgs ) . toEqual ( [
7776 '-n' ,
7877 'codecov' ,
7978 '-Q' ,
@@ -141,7 +140,7 @@ test('all arguments', () => {
141140 '/test.xcresult' ,
142141 '--some --other --args' ,
143142 ] ) ;
144- expect ( failCi ) . toBeTruthy ( ) ;
143+ expect ( opts . failCi ) . toBeTruthy ( ) ;
145144
146145 for ( const env of Object . keys ( envs ) ) {
147146 delete process . env [ 'INPUT_' + env . toUpperCase ( ) ] ;
@@ -156,16 +155,16 @@ describe('trim arguments after splitting them', () => {
156155 expect . stringContaining ( 'github-action' ) ,
157156 ] ;
158157
159- test ( 'files' , ( ) => {
160- const envs = { files : './client-coverage.txt, ./lcov.info' } ;
158+ test ( 'files' , async ( ) => {
159+ const envs = { ' files' : './client-coverage.txt, ./lcov.info' } ;
161160
162161 for ( const [ name , value ] of Object . entries ( envs ) ) {
163162 process . env [ 'INPUT_' + name . toUpperCase ( ) ] = value ;
164163 }
165164
166- const { execArgs } = buildExec ( ) ;
165+ const opts = await buildExec ( ) ;
167166
168- expect ( execArgs ) . toEqual (
167+ expect ( opts . execArgs ) . toEqual (
169168 expect . arrayContaining ( [
170169 ...baseExpectation ,
171170 '-f' ,
@@ -180,16 +179,16 @@ describe('trim arguments after splitting them', () => {
180179 }
181180 } ) ;
182181
183- test ( 'flags' , ( ) => {
184- const envs = { flags : 'ios, mobile' } ;
182+ test ( 'flags' , async ( ) => {
183+ const envs = { ' flags' : 'ios, mobile' } ;
185184
186185 for ( const [ name , value ] of Object . entries ( envs ) ) {
187186 process . env [ 'INPUT_' + name . toUpperCase ( ) ] = value ;
188187 }
189188
190- const { execArgs } = buildExec ( ) ;
189+ const opts = await buildExec ( ) ;
191190
192- expect ( execArgs ) . toEqual (
191+ expect ( opts . execArgs ) . toEqual (
193192 expect . arrayContaining ( [
194193 ...baseExpectation ,
195194 '-F' ,
@@ -204,16 +203,16 @@ describe('trim arguments after splitting them', () => {
204203 }
205204 } ) ;
206205
207- test ( 'functionalities' , ( ) => {
208- const envs = { functionalities : 'network, gcov' } ;
206+ test ( 'functionalities' , async ( ) => {
207+ const envs = { ' functionalities' : 'network, gcov' } ;
209208
210209 for ( const [ name , value ] of Object . entries ( envs ) ) {
211210 process . env [ 'INPUT_' + name . toUpperCase ( ) ] = value ;
212211 }
213212
214- const { execArgs } = buildExec ( ) ;
213+ const opts = await buildExec ( ) ;
215214
216- expect ( execArgs ) . toEqual (
215+ expect ( opts . execArgs ) . toEqual (
217216 expect . arrayContaining ( [
218217 ...baseExpectation ,
219218 '-X' ,
0 commit comments