design overhaul and default route
Sonarqube Scanner / Build and analyze (push) Failing after 10s

This commit is contained in:
Florian Zumpe
2026-09-27 20:21:29 +02:00
parent 98a7293efd
commit 8fb5b3a397
9 changed files with 615 additions and 97 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('presentation example uses real GPX track points and the existing upload API', async () => {
const gpx = await read('examples/presentation-route.gpx');
const metadata = JSON.parse(await read('examples/presentation-route.json'));
const script = await read('scripts/upload-presentation-route.sh');
assert.ok((gpx.match(/<trkpt\b/g) || []).length >= 8);
assert.doesNotMatch(gpx, /<rtept\b/);
assert.ok(metadata.pois.length >= 3);
assert.match(script, /POST "\$BASE_URL\/routes"/);
assert.match(script, /POST "\$BASE_URL\/routes\/\$ROUTE_ID\/pois"/);
});