feat: frontend tests — import/export validator + unit tests + CI integration
CI / lint (push) Successful in 14s
CI / security (push) Successful in 11s
CI / test (push) Successful in 17s
CI / build (push) Successful in 2s

- tests/frontend/validate-imports.mjs: 0 errors on 13 modules, 79 exports
  Detects: missing exports, broken imports, const reassignments
- tests/frontend/unit.test.mjs: escapeHtml, state object, module syntax
- Added to CI lint job (runs after Ruff + Mypy)
This commit is contained in:
2026-05-28 18:46:10 -04:00
parent 2c6c74419c
commit ffc6dac172
4 changed files with 350 additions and 4 deletions
+4 -4
View File
@@ -44,7 +44,7 @@ function hideProgressBar() {
// loadVaultSettings
// =========================================================================
async function loadVaultSettings() {
export async function loadVaultSettings() {
try {
const settings = await api("/api/vaults/settings/all");
state.vaultSettings = settings;
@@ -84,7 +84,7 @@ function _isInputFocused() {
// initSearch
// =========================================================================
function initSearch() {
export function initSearch() {
const input = document.getElementById("search-input");
if (!input) return;
const caseBtn = document.getElementById("search-case-btn");
@@ -309,7 +309,7 @@ function initSearch() {
// showWelcome
// =========================================================================
function showWelcome() {
export function showWelcome() {
hideProgressBar();
// Restore or rebuild the dashboard with tabbed sections
@@ -422,7 +422,7 @@ function showWelcome() {
// goHome
// =========================================================================
function goHome() {
export function goHome() {
const searchInput = document.getElementById("search-input");
if (searchInput) searchInput.value = "";