Reworked watcher events and describing texts

This commit is contained in:
Florian Zumpe
2026-06-16 16:45:59 +02:00
parent 289c6d5a43
commit 4529749baa
17 changed files with 347 additions and 57 deletions
+22
View File
@@ -0,0 +1,22 @@
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import test from 'node:test';
const root = path.resolve(import.meta.dirname, '..');
async function read(relativePath) {
return fs.readFile(path.join(root, relativePath), 'utf8');
}
test('start page keeps nearby recommendations and the complete route list', async () => {
const html = await read('public/index.html');
const app = await read('public/js/app.js');
assert.match(html, /id="nearby-route-list"/);
assert.match(html, /id="all-route-list"/);
assert.match(html, /id="route-search"/);
assert.match(app, /renderRouteItems\('#nearby-route-list'/);
assert.match(app, /renderRouteItems\(\s*'#all-route-list'/);
assert.doesNotMatch(app, /state\.routes\s*=\s*state\.routes[\s\S]*?\.filter\(route => route\.proximityM/);
});