test: зелёный сьют — синхрон политики пароля (8), jsdom devDep, serial-прогон

Чинит 8 «baseline»-падений (теперь 330/330):
- auth (3): контроллер/фронт требуют пароль >=8, а схема роута (minLen:6) и тест
  (7-симв. 'pass123') устарели → схема register/profile 6→8, тест-пароли → 8 симв.
  (login/duplicate падали как следствие незарегистрированного юзера).
- page (5): jsdom не был установлен → добавлен в devDependencies.
- флакость jsdom-страниц при параллельном прогоне (фикс. wait под нагрузкой CPU) →
  npm test с --test-concurrency=1 (детерминированно; в изоляции тесты и так проходят).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maxim Dolgolyov
2026-06-19 16:53:04 +03:00
parent eed8343977
commit 2d7833cad9
4 changed files with 550 additions and 6 deletions
+2 -1
View File
@@ -16,7 +16,7 @@
"import:exam-tasks": "node scripts/import-exam-tasks.js",
"index:textbooks": "node scripts/index-textbooks.js",
"index:textbooks:full": "node scripts/index-textbooks-headless.js",
"test": "node --test tests/*.test.js",
"test": "node --test --test-concurrency=1 tests/*.test.js",
"hooks:install": "sh ../scripts/install-hooks.sh"
},
"dependencies": {
@@ -33,6 +33,7 @@
"ws": "^8.20.0"
},
"devDependencies": {
"jsdom": "^29.1.1",
"nodemon": "^3.1.0"
}
}