@@ -3,7 +3,7 @@ import { rm } from 'node:fs/promises';
33import { resolve } from 'node:path' ;
44import { fileURLToPath } from 'node:url' ;
55
6- import { afterAll , describe , expect , it } from 'vitest' ;
6+ import { afterAll , expect , it } from 'vitest' ;
77
88const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
99const nodePath = process . execPath ;
@@ -20,26 +20,24 @@ afterAll(async () => {
2020 ) ;
2121} ) ;
2222
23- describe ( 'integration' , ( ) => {
24- it ( 'runs action' , ( ) => {
25- const result = spawnSync ( nodePath , [ actionPath ] , {
26- env : {
27- ...process . env ,
28- 'INPUT_CLI-NAME' : 'gh' ,
29- 'INPUT_CLI-VERSION' : '2.27.0' ,
30- RUNNER_TOOL_CACHE : runnerToolCachePath ,
31- RUNNER_TEMP : runnerTempPath ,
32- } ,
33- stdio : 'pipe' ,
34- } ) ;
23+ it ( 'runs action' , ( ) => {
24+ const result = spawnSync ( nodePath , [ actionPath ] , {
25+ env : {
26+ ...process . env ,
27+ 'INPUT_CLI-NAME' : 'gh' ,
28+ 'INPUT_CLI-VERSION' : '2.27.0' ,
29+ RUNNER_TOOL_CACHE : runnerToolCachePath ,
30+ RUNNER_TEMP : runnerTempPath ,
31+ } ,
32+ stdio : 'pipe' ,
33+ } ) ;
3534
36- if ( result . status !== 0 ) {
37- /* eslint-disable no-console */
38- console . error ( 'stdout:' , result . stdout ?. toString ( ) ) ;
39- console . error ( 'stderr:' , result . stderr ?. toString ( ) ) ;
40- /* eslint-enable no-console */
41- }
35+ if ( result . status !== 0 ) {
36+ /* eslint-disable no-console */
37+ console . error ( 'stdout:' , result . stdout ?. toString ( ) ) ;
38+ console . error ( 'stderr:' , result . stderr ?. toString ( ) ) ;
39+ /* eslint-enable no-console */
40+ }
4241
43- expect ( result . status ) . toBe ( 0 ) ;
44- } ) ;
42+ expect ( result . status ) . toBe ( 0 ) ;
4543} ) ;
0 commit comments