@@ -27,16 +27,24 @@ onlyRunOnCI('externalLinks', () => {
2727 describe ( 'should be reachable' , ( ) => {
2828 const { reddit, twitter } = externalLinksModule . socialMedia
2929 for ( const [ linksGroupName , linksGroup ] of Object . entries ( externalLinksModule ) ) {
30- for ( const [ linkName , url ] of Object . entries ( linksGroup ) ) {
30+ for ( const [ linkName , originalUrl ] of Object . entries ( linksGroup ) ) {
31+ let url = originalUrl
3132 if ( ! url || typeof url !== 'string' ) continue
3233 if ( ! ! reddit && url . startsWith ( reddit ) ) continue // Reddit often returns 504
3334 if ( ! ! twitter && url . startsWith ( twitter ) ) continue // redirect loop
3435 if ( url . startsWith ( externalLinksModule . referrals . coinGecko ) ) continue // CoinGecko has CloudFlare DDOS protection
35- if ( url . startsWith ( externalLinksModule . github . commit ) ) continue // We store only partial url in constants
36- if ( url . startsWith ( externalLinksModule . github . releaseTag ) ) continue // We store only partial url in constants
37- if ( url . startsWith ( externalLinksModule . ipfs . proxyPrefix ) ) continue // We store only partial url in constants
3836 if ( url . startsWith ( 'mailto' ) ) continue // We can't test email addresses
3937
38+ if ( url . startsWith ( externalLinksModule . github . commit ) ) {
39+ url += '904840745dde1a5dfff6608213e50dfa4d4ee7c8'
40+ }
41+ if ( url . startsWith ( externalLinksModule . github . releaseTag ) ) {
42+ url += 'v1.2.0'
43+ }
44+ if ( url . startsWith ( externalLinksModule . ipfs . proxyPrefix ) ) {
45+ url += 'bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m'
46+ }
47+
4048 it . concurrent ( `${ linksGroupName } ${ linkName } ${ url } ` , async ( ) => {
4149 const response = await nodeFetch ( url , { method : 'GET' } )
4250 expect ( response . status ) . toBe ( 200 )
0 commit comments