From 9ee1675d3cd744239f5127c75e7d36dc6da1f2a9 Mon Sep 17 00:00:00 2001 From: pavlov346346-source Date: Fri, 11 Sep 2026 07:39:41 +0300 Subject: [PATCH] test: add html style integrity checks --- tests/html-integrity-v1774.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/html-integrity-v1774.mjs 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('}