fix: test unitaire frontend — recherche.js exempté d'import/export (fichier vendangé #68)
CI / security (pull_request) Failing after 1s
CI / lint (pull_request) Successful in 1m36s
CI / test (pull_request) Failing after 3m47s
CI / build (pull_request) Skipped
CI / e2e (pull_request) Skipped

This commit is contained in:
Spark
2026-11-03 05:48:53 +00:00
parent 67fbda60d3
commit f7095f8057
+3 -1
View File
@@ -112,8 +112,10 @@ function testModulesHaveImports() {
{ file: 'navfacets.js', reason: 'pure helpers — no deps, imported by vaulthome.js' },
{ file: 'sidebar_raw.js', reason: 'legacy file — excluded' },
{ file: 'desktop.js', reason: 'standalone — reads window.__TAURI__ global, no imports needed' },
{ file: 'recherche.js', reason: 'standalone — vanilla sans dépendance, vendangé tel quel par chaque hôte (#68)', noExport: true },
];
const expectNoImport = new Set(expected.map(e => e.file));
const expectNoExport = new Set(expected.filter(e => e.noExport).map(e => e.file));
for (const file of files) {
const content = readFileSync(join(JS_DIR, file), 'utf-8');
@@ -123,7 +125,7 @@ function testModulesHaveImports() {
if (!expectNoImport.has(file)) {
assert.ok(hasImport, `${file} should have at least one import`);
}
if (file !== 'state.js' && file !== 'app.js') {
if (file !== 'state.js' && file !== 'app.js' && !expectNoExport.has(file)) {
assert.ok(hasExport, `${file} should have at least one export`);
}
}