diff --git a/tests/html-integrity-v1774.mjs b/tests/html-integrity-v1774.mjs new file mode 100644 index 0000000..9342b58 --- /dev/null +++ b/tests/html-integrity-v1774.mjs @@ -0,0 +1,11 @@ +import fs from 'node:fs'; +const html=fs.readFileSync('public/index.html','utf8'); +let bad=0; +const check=(value,message)=>{console.log(`${value?'OK':'FAIL'}: ${message}`);if(!value)bad++}; +const opens=(html.match(/)/gi)||[]).length; +const closes=(html.match(/<\/style>/gi)||[]).length; +check(opens===closes,`style tags balanced (${opens} open / ${closes} close)`); +check(!html.includes('}