fix(places): the closed-day tests parse, and the inspector keeps its size

A test title held an unescaped apostrophe, so the file did not parse. The
inspector maps a provider's week through one helper again, which keeps it
at its size baseline, and the counts type of the rail stays inside its file.
This commit is contained in:
Maurice
2026-11-30 13:28:00 +01:00
parent f15b9e73a0
commit 73e3ac2606
4 changed files with 15 additions and 6 deletions
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
import { closedHoursLine, convertHoursLine, isUnknownHoursLine, splitHoursLine } from './placeHoursFormat'
import { closedHoursLine, closedHoursLines, convertHoursLine, isUnknownHoursLine, splitHoursLine } from './placeHoursFormat'
describe('convertHoursLine', () => {
it('FE-PLANNER-HOURS-001: a range that stays in one half of the day carries the meridiem back to its opener', () => {
@@ -56,7 +56,7 @@ describe('isUnknownHoursLine', () => {
})
describe('closedHoursLine', () => {
it('FE-PLANNER-HOURS-010: a day OSM tags off or closed reads as closed in the reader's words', () => {
it('FE-PLANNER-HOURS-010: a day OSM tags off or closed reads as closed in the words of the reader', () => {
expect(closedHoursLine('Monday: off', 'Geschlossen')).toBe('Monday: Geschlossen')
expect(closedHoursLine('Sunday: Closed', 'Fermé')).toBe('Sunday: Fermé')
expect(closedHoursLine('off', 'Closed')).toBe('Closed')
@@ -67,4 +67,9 @@ describe('closedHoursLine', () => {
expect(closedHoursLine('Friday: 09:00-12:00 off', 'Closed')).toBe('Friday: 09:00-12:00 off')
expect(closedHoursLine('', 'Closed')).toBe('')
})
it('FE-PLANNER-HOURS-012: a whole week reads its closed days the same way, and no week stays none', () => {
expect(closedHoursLines(['Monday: off', 'Tuesday: 09:00-17:00'], 'Closed')).toEqual(['Monday: Closed', 'Tuesday: 09:00-17:00'])
expect(closedHoursLines(undefined, 'Closed')).toBeNull()
})
})