File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2424 uses : actions/setup-node@v4
2525 with :
2626 node-version : ${{ matrix.node-version }}
27- cache : ' npm'
2827 - run : npm ci
2928 - run : npm run lint
30- - run : npm run build --if-present
29+ - run : npm run build
3130 - run : npm test
Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ describe('`imgdl`', () => {
112112
113113 it ( 'should not throw any error if one of the URLs is invalid, call onError instead' , async ( ) => {
114114 const urls = [ `${ BASE_URL } /img-1.jpg` , `${ BASE_URL } /unknown` ] ;
115- const onError = vi . fn < Parameters < OnError > > ( ) ;
115+ const onError = vi
116+ . fn < Parameters < OnError > > ( )
117+ . mockImplementation ( ( err , url ) => console . log ( url , err . message ) ) ;
116118
117119 await expect ( imgdl ( urls , { directory, onError } ) ) . resolves . toHaveLength ( 1 ) ;
118120 expect ( onError ) . toHaveBeenCalledTimes ( 1 ) ;
You can’t perform that action at this time.
0 commit comments