Files
Wegwichtel/test/gpx.test.js
T
Florian Zumpe 497b7b8050
Sonarqube Scanner / Prepare environment (push) Successful in 11s
Sonarqube Scanner / Build and test (push) Successful in 29s
Sonarqube Scanner / SonarQube analysis (push) Successful in 1m25s
Sonarqube Scanner / Deploy to Server (push) Successful in 7s
directory cleanup for tests
2026-10-04 08:12:08 +02:00

14 lines
531 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { parseGpx } from '../src/services/gpx.js';
import { SAMPLE_GPX } from '../test-support/gpx-fixtures.js';
test('parseGpx reads synthetic track data without repository example files', () => {
const parsed = parseGpx(SAMPLE_GPX);
assert.equal(parsed.name, 'Testweg');
assert.equal(parsed.points.length, 3);
assert.ok(parsed.metrics.distanceM > 0);
assert.equal(parsed.points[0].lat, 52.5200);
assert.equal(parsed.points[2].lon, 13.4090);
});