mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
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:
@@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user