File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -246,15 +246,15 @@ async function main() {
246
246
}
247
247
248
248
const total = ( Date . now ( ) - start ) / 1000 ;
249
-
249
+ const scannedLinks = result . links . filter ( x => x . state !== LinkState . SKIPPED ) ;
250
250
if ( ! result . passed ) {
251
251
const borked = result . links . filter ( x => x . state === LinkState . BROKEN ) ;
252
252
logger . error (
253
253
chalk . bold (
254
254
`${ chalk . red ( 'ERROR' ) } : Detected ${
255
255
borked . length
256
256
} broken links. Scanned ${ chalk . yellow (
257
- result . links . length . toString ( )
257
+ scannedLinks . length . toString ( )
258
258
) } links in ${ chalk . cyan ( total . toString ( ) ) } seconds.`
259
259
)
260
260
) ;
@@ -264,7 +264,7 @@ async function main() {
264
264
logger . error (
265
265
chalk . bold (
266
266
`🤖 Successfully scanned ${ chalk . green (
267
- result . links . length . toString ( )
267
+ scannedLinks . length . toString ( )
268
268
) } links in ${ chalk . cyan ( total . toString ( ) ) } seconds.`
269
269
)
270
270
) ;
Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ describe('cli', function () {
62
62
'"LICENSE.md, unlinked.md"' ,
63
63
'test/fixtures/markdown/README.md' ,
64
64
] ) ;
65
- assert . match ( stripAnsi ( res . stdout ) , / \[ S K P \] / ) ;
65
+ const stdout = stripAnsi ( res . stdout ) ;
66
+ const stderr = stripAnsi ( res . stderr ) ;
67
+ assert . match ( stdout , / \[ S K P \] / ) ;
68
+ // make sure we don't report skipped links in the count
69
+ assert . match ( stderr , / s c a n n e d 2 l i n k s / ) ;
66
70
} ) ;
67
71
68
72
it ( 'should provide CSV if asked nicely' , async ( ) => {
You can’t perform that action at this time.
0 commit comments