File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
packages/plugin-axe/src/lib/runner Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,20 @@ export async function loadSetupScript(
3434 ? setupScript
3535 : path . join ( process . cwd ( ) , setupScript ) ;
3636
37- logger . debug ( `Resolved setup script path: ${ absolutePath } ` ) ;
38-
3937 if ( ! ( await fileExists ( absolutePath ) ) ) {
4038 throw new Error ( `Setup script not found: ${ absolutePath } ` ) ;
4139 }
4240
43- const module : unknown = await import ( absolutePath ) ;
44- const validModule = await validateAsync ( setupScriptModuleSchema , module , {
45- filePath : absolutePath ,
46- } ) ;
41+ const validModule = await logger . task (
42+ `Loading setup script from ${ absolutePath } ` ,
43+ async ( ) => {
44+ const module : unknown = await import ( absolutePath ) ;
45+ const validated = await validateAsync ( setupScriptModuleSchema , module , {
46+ filePath : absolutePath ,
47+ } ) ;
48+ return { message : 'Setup script loaded successfully' , result : validated } ;
49+ } ,
50+ ) ;
4751
4852 return validModule . default ;
4953}
You can’t perform that action at this time.
0 commit comments