Files
Wegwichtel/test/presentation-route.test.js
T
Florian Zumpe aff88eba1b
Sonarqube Scanner / Prepare environment (push) Successful in 20s
Sonarqube Scanner / Build and test (push) Failing after 36s
Sonarqube Scanner / SonarQube analysis (push) Skipped
Sonarqube Scanner / Deploy to Server (push) Successful in 9s
Internationalization
2026-10-01 09:41:01 +02:00

24 lines
897 B
JavaScript

import { readAppFile } from '../test-support/i18n.js';
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 readAppFile(relativePath);
}
test('presentation example uses real GPX Streckenpunkte 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"/);
});