mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
Allow 403
This commit is contained in:
parent
f6ca785f7d
commit
6a888913ab
@ -13,10 +13,14 @@ describe( 'Links in the source files', function( ) {
|
|||||||
if( process.env.verbose ) console.log( 'Validating ', linksWithFile.length, ' links' )
|
if( process.env.verbose ) console.log( 'Validating ', linksWithFile.length, ' links' )
|
||||||
|
|
||||||
const broken = await Promise.all( linksWithFile.map( link => isBroken( link ) ) )
|
const broken = await Promise.all( linksWithFile.map( link => isBroken( link ) ) )
|
||||||
const filtered = broken.filter( notfalse => notfalse )
|
let filtered = broken.filter( notfalse => notfalse )
|
||||||
|
|
||||||
if( process.env.verbose && filtered.length > 0 ) await fs.writeFile( `${__dirname}/../broken-links.json`, JSON.stringify( filtered, null, 2 ) )
|
if( process.env.verbose && filtered.length > 0 ) await fs.writeFile( `${__dirname}/../broken-links.json`, JSON.stringify( filtered, null, 2 ) )
|
||||||
if( process.env.verbose && filtered.length > 0 ) console.log( filtered.length , ' links are broken' )
|
if( process.env.verbose && filtered.length > 0 ) console.log( filtered.length , ' links are broken' )
|
||||||
|
if( process.env.verbose && filtered.length > 0 ) console.log( filtered )
|
||||||
|
|
||||||
|
// allow 403
|
||||||
|
filtered = filtered.filter( ( { code } ) => code != 403 )
|
||||||
|
|
||||||
return filtered.should.have.length( 0 )
|
return filtered.should.have.length( 0 )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user