From 39315e34cb8acd55b42dc167c1d2e5901dca5811 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Mon, 29 Nov 2021 00:10:45 -0600 Subject: [PATCH] Test for markdown in sttatus text --- test/prebuild.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/prebuild.js b/test/prebuild.js index ff3ade1..5e32b91 100644 --- a/test/prebuild.js +++ b/test/prebuild.js @@ -33,8 +33,7 @@ test('README Apps are formated correctly', (t) => { readmeAppList } = t.context - // console.log('readmeAppList', readmeAppList) - t.log('readmeAppList', readmeAppList.length) + // t.log('readmeAppList', readmeAppList.length) for (const readmeApp of readmeAppList) { @@ -48,6 +47,12 @@ test('README Apps are formated correctly', (t) => { t.fail(`README App ${readmeApp.name} does not have valid url`, readmeApp.url) } } + // t.log('All urls valid and secure') + + // Check that status text is free of markdown + if ( readmeApp.text.includes('](') ) { + t.fail(`README App ${readmeApp.name} markdown in status text`) + } for ( const character of cleanedAppName ) { if ( !allowedTitleCharacters.has( character ) ) { @@ -60,6 +65,7 @@ test('README Apps are formated correctly', (t) => { break } } + // t.log('All titles alphanumeric') }