1- import { beforeEach , describe , expect , test } from '@jest/globals ' ;
1+ import { beforeEach , describe , expect , test } from 'vitest ' ;
22import * as os from 'os' ;
33import * as path from 'path' ;
44
@@ -15,7 +15,7 @@ describe('getInputs', () => {
1515 } ) ;
1616
1717 // prettier-ignore
18- test . each ( [
18+ const cases : [ number , Map < string , string > , context . Inputs ] [ ] = [
1919 [
2020 0 ,
2121 new Map < string , string > ( [
@@ -35,7 +35,7 @@ describe('getInputs', () => {
3535 setHost : false ,
3636 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
3737 githubToken : '' ,
38- } as context . Inputs
38+ }
3939 ] ,
4040 [
4141 1 ,
@@ -59,7 +59,7 @@ describe('getInputs', () => {
5959 setHost : false ,
6060 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
6161 githubToken : '' ,
62- } as context . Inputs
62+ }
6363 ] ,
6464 [
6565 2 ,
@@ -79,7 +79,7 @@ describe('getInputs', () => {
7979 setHost : true ,
8080 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
8181 githubToken : '' ,
82- } as context . Inputs
82+ }
8383 ] ,
8484 [
8585 3 ,
@@ -101,7 +101,7 @@ describe('getInputs', () => {
101101 setHost : false ,
102102 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
103103 githubToken : '' ,
104- } as context . Inputs
104+ }
105105 ] ,
106106 [
107107 4 ,
@@ -121,7 +121,7 @@ describe('getInputs', () => {
121121 setHost : false ,
122122 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
123123 githubToken : '' ,
124- } as context . Inputs
124+ }
125125 ] ,
126126 [
127127 5 ,
@@ -142,7 +142,7 @@ describe('getInputs', () => {
142142 rootless : false ,
143143 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
144144 githubToken : '' ,
145- } as context . Inputs
145+ }
146146 ] ,
147147 [
148148 6 ,
@@ -163,7 +163,7 @@ describe('getInputs', () => {
163163 rootless : false ,
164164 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
165165 githubToken : '' ,
166- } as context . Inputs
166+ }
167167 ] ,
168168 [
169169 7 ,
@@ -183,7 +183,7 @@ describe('getInputs', () => {
183183 rootless : false ,
184184 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
185185 githubToken : '' ,
186- } as context . Inputs
186+ }
187187 ] ,
188188 [
189189 8 ,
@@ -203,7 +203,7 @@ describe('getInputs', () => {
203203 rootless : true ,
204204 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
205205 githubToken : '' ,
206- } as context . Inputs
206+ }
207207 ] ,
208208 [
209209 9 ,
@@ -226,10 +226,11 @@ describe('getInputs', () => {
226226 setHost : false ,
227227 runtimeBasedir : path . join ( os . homedir ( ) , `setup-docker-action` ) ,
228228 githubToken : '' ,
229- } as context . Inputs
229+ }
230230 ] ,
231- ] ) (
232- '[%d] given %p as inputs, returns %p' ,
231+ ] ;
232+ test . each ( cases ) (
233+ '[%d] given %o as inputs, returns %o' ,
233234 async ( num : number , inputs : Map < string , string > , expected : context . Inputs ) => {
234235 inputs . forEach ( ( value : string , name : string ) => {
235236 setInput ( name , value ) ;
0 commit comments