mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(tours): translate the ferrata badge everywhere, count the tile cache writes as standalone, settle the new test warnings
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"@typescript-eslint/no-non-null-assertion": 404,
|
||||
"@typescript-eslint/no-misused-promises": 876,
|
||||
"no-console": 88,
|
||||
"complexity": 231,
|
||||
"complexity": 230,
|
||||
"@typescript-eslint/no-explicit-any": 148,
|
||||
"trek/no-swallowed-catch": 133,
|
||||
"max-params": 35,
|
||||
|
||||
@@ -31,8 +31,10 @@ const routed = {
|
||||
}
|
||||
const enriched = [[48, 11, 500], [48.01, 11.02, 550]] as [number, number, number][]
|
||||
// With the heights in, the walking time is the hiking rule over the enriched line, not the router's.
|
||||
const enrichedAnalysis = analyzeRouteGeometry(JSON.stringify(enriched))!
|
||||
const enrichedWalkingSeconds = hikingTimeMinutes(enrichedAnalysis.distanceKm, enrichedAnalysis.gain!, enrichedAnalysis.loss!) * 60
|
||||
const enrichedAnalysis = analyzeRouteGeometry(JSON.stringify(enriched))
|
||||
if (!enrichedAnalysis) throw new Error('the enriched line has no analysis')
|
||||
const enrichedWalkingSeconds =
|
||||
hikingTimeMinutes(enrichedAnalysis.distanceKm, enrichedAnalysis.gain ?? 0, enrichedAnalysis.loss ?? 0) * 60
|
||||
const savedTour = {
|
||||
place_id: 42,
|
||||
name: 'Saved ridge',
|
||||
|
||||
@@ -48,12 +48,18 @@ describe('usePlacedPointHint', () => {
|
||||
const { result, place } = setup();
|
||||
place([A, B]);
|
||||
act(() => result.current.hold(true));
|
||||
act(() => vi.advanceTimersByTime(PLACED_HINT_MS * 2));
|
||||
act(() => {
|
||||
vi.advanceTimersByTime(PLACED_HINT_MS * 2);
|
||||
});
|
||||
expect(result.current.shown).toBe(true);
|
||||
act(() => result.current.hold(false));
|
||||
act(() => vi.advanceTimersByTime(PLACED_HINT_MS - 1));
|
||||
act(() => {
|
||||
vi.advanceTimersByTime(PLACED_HINT_MS - 1);
|
||||
});
|
||||
expect(result.current.shown).toBe(true);
|
||||
act(() => vi.advanceTimersByTime(1));
|
||||
act(() => {
|
||||
vi.advanceTimersByTime(1);
|
||||
});
|
||||
expect(result.current.shown).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user