fix conversion layout (button below input), add missing closing divs, add HTML div-balance test

This commit is contained in:
2026-08-09 22:47:49 +03:00
parent 9510813e78
commit c0d69040d5
2 changed files with 14 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
const { test } = require('node:test');
const assert = require('node:assert');
const fs = require('node:fs');
const path = require('node:path');
const html = fs.readFileSync(path.join(__dirname, '..', 'index.html'), 'utf8');
const opens = (html.match(/<div\b/g) || []).length;
const closes = (html.match(/<\/div>/g) || []).length;
test('HTML <div> tags are balanced', () => {
assert.strictEqual(opens, closes, `Unbalanced divs: ${opens} opens vs ${closes} closes`);
});