Commit 2f1856a 1 parent baa00c0 commit 2f1856a Copy full SHA for 2f1856a
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { expect } from '@playwright/test';
5
5
import { getDocument } from 'pdfjs-dist/legacy/build/pdf.mjs' ;
6
6
7
7
import type { Simulation } from './types' ;
8
+ import { logger } from '../logging-fixture' ;
8
9
9
10
/**
10
11
* Find the first PDF file in a directory.
@@ -15,12 +16,12 @@ export function findFirstPdf(directory: string): string | null {
15
16
try {
16
17
const pdfFile = fs . readdirSync ( directory ) . find ( ( file ) => file . endsWith ( '.pdf' ) ) ;
17
18
if ( ! pdfFile ) {
18
- console . error ( `No PDF files found in directory: ${ directory } ` ) ;
19
+ logger . error ( `No PDF files found in directory: ${ directory } ` ) ;
19
20
return null ;
20
21
}
21
22
return path . resolve ( directory , pdfFile ) ;
22
23
} catch ( error ) {
23
- console . error ( `Error reading directory: ${ directory } ` , error ) ;
24
+ logger . error ( `Error reading directory: ${ directory } ` , error ) ;
24
25
return null ;
25
26
}
26
27
}
You can’t perform that action at this time.
0 commit comments