diff --git a/packages/phishing/src/addrcheck.spec.ts b/packages/phishing/src/addrcheck.spec.ts index f82b34622..f76216854 100644 --- a/packages/phishing/src/addrcheck.spec.ts +++ b/packages/phishing/src/addrcheck.spec.ts @@ -7,6 +7,8 @@ import { fetch } from '@polkadot/x-fetch'; import { retrieveAddrList } from '.'; +const TICKS = '```'; + // a timeout with a 2s timeout async function fetchWithTimeout (url: string, timeout = 2000): Promise { const controller = new AbortController(); @@ -103,7 +105,7 @@ describe('addrcheck', (): void => { console.log('Addresses found\n', JSON.stringify(mapFound, null, 2)); console.log('Addresses missing\n', JSON.stringify(mapMiss, null, 2)); - sites.length && process.env.CI_LOG && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${JSON.stringify(mapMiss, null, 2)}\n`); + sites.length && process.env.CI_LOG && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${TICKS}\n${JSON.stringify(mapMiss, null, 2)}\n${TICKS}\n`); expect(sites).toEqual([]); }); diff --git a/packages/phishing/src/crosscheck.spec.ts b/packages/phishing/src/crosscheck.spec.ts index 874b91593..1a054faa7 100644 --- a/packages/phishing/src/crosscheck.spec.ts +++ b/packages/phishing/src/crosscheck.spec.ts @@ -22,6 +22,8 @@ interface EthPhishing { blacklist: string[]; } +const TICKS = '```'; + function assertAndLog (check: boolean, error: string): void { if (!check) { process.env.CI_LOG && fs.appendFileSync('./.github/crosscheck.md', ` @@ -66,6 +68,6 @@ describe('crosscheck', (): void => { console.log('eth-phishing-detect', JSON.stringify(filtered, null, 2)); - assertAndLog(missing.length === 0, `Missing entries found from eth-phishing-detect: ${JSON.stringify(missing, null, 2)}`); + assertAndLog(missing.length === 0, `Missing entries found from eth-phishing-detect:\n\n${TICKS}\n${JSON.stringify(missing, null, 2)}\n${TICKS}`); }); });