mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 15:06:32 +00:00
fix(tours): fit the merged tracks together after integration
Types, test expectations and helpers the seven tracks each changed on their own, brought in line with the integrated code. tours.service.ts and the tours repository grew past the size limit with every track and hand their row and write helpers to modules of their own.
This commit is contained in:
@@ -19,8 +19,15 @@ import { describe, expect, it } from 'vitest';
|
||||
|
||||
type Role = 'start' | 'via' | 'end';
|
||||
|
||||
/** What a test sets on a point beyond its place and role. */
|
||||
interface PointExtra {
|
||||
stage_end?: boolean;
|
||||
shaping?: boolean;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
/** A straight run of points along a meridian, each a stop unless told otherwise. */
|
||||
function points(count: number, extra: (index: number) => Record<string, unknown> = () => ({})) {
|
||||
function points(count: number, extra: (index: number) => PointExtra = () => ({})) {
|
||||
return Array.from({ length: count }, (_, sequence) => ({
|
||||
lat: 47 + sequence * 0.01,
|
||||
lng: 11,
|
||||
|
||||
Reference in New Issue
Block a user