14 lines
531 B
JavaScript
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);
|
|
});
|