Skip to content

Commit a7690e9

Browse files
committed
force day-of-year knowledge on get-detailed-building-status
1 parent 3f64a20 commit a7690e9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/views/building-hours/lib/__tests__/get-detailed-building-status.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// @flow
22
import {getDetailedBuildingStatus} from '../get-detailed-status'
3-
import {dayMoment} from './moment.helper'
3+
import {plainMoment} from './moment.helper'
44

55
xit('returns a list of [isOpen, scheduleName, verboseStatus] tuples', () => {
6-
let m = dayMoment('Fri 1:00pm')
6+
let m = plainMoment('06-23-2017 1:00pm', 'MM-DD-YYYY h:mma')
77
let building = {
88
name: 'building',
99
category: '???',
@@ -32,7 +32,7 @@ xit('returns a list of [isOpen, scheduleName, verboseStatus] tuples', () => {
3232
})
3333

3434
xit('checks a list of schedules to see if any are open', () => {
35-
let m = dayMoment('Fri 1:00pm')
35+
let m = plainMoment('06-23-2017 1:00pm', 'MM-DD-YYYY h:mma')
3636
let building = {
3737
name: 'building',
3838
category: '???',
@@ -56,7 +56,7 @@ xit('checks a list of schedules to see if any are open', () => {
5656
})
5757

5858
it('handles multiple internal schedules for the same timeframe', () => {
59-
let m = dayMoment('Mon 1:00pm')
59+
let m = plainMoment('06-19-2017 1:00pm', 'MM-DD-YYYY h:mma')
6060
let building = {
6161
name: 'building',
6262
category: '???',
@@ -80,7 +80,7 @@ it('handles multiple internal schedules for the same timeframe', () => {
8080
})
8181

8282
it('handles multiple named schedules for the same timeframe', () => {
83-
let m = dayMoment('Mon 1:00pm')
83+
let m = plainMoment('06-19-2017 1:00pm', 'MM-DD-YYYY h:mma')
8484
let building = {
8585
name: 'building',
8686
category: '???',
@@ -109,7 +109,7 @@ it('handles multiple named schedules for the same timeframe', () => {
109109
})
110110

111111
xit('returns false if none are available for this day', () => {
112-
let m = dayMoment('Sun 1:00pm')
112+
let m = plainMoment('06-18-2017 1:00pm', 'MM-DD-YYYY h:mma')
113113
let building = {
114114
name: 'building',
115115
category: '???',
@@ -132,7 +132,7 @@ xit('returns false if none are available for this day', () => {
132132
})
133133

134134
it('returns false if none are open', () => {
135-
let m = dayMoment('Mon 3:00pm')
135+
let m = plainMoment('06-19-2017 3:00pm', 'MM-DD-YYYY h:mma')
136136
let building = {
137137
name: 'building',
138138
category: '???',

0 commit comments

Comments
 (0)