mardi 31 mars 2015

javascript expect.toBe with multiple values

I have problem related to daylight saving time. I have javascript jasmine test, where I test that opening time is correct. The opening times are stored in GMT-time, because they are gotten from backend api. The problem is, that the correct opening times cannot be tested with expect.toBe(certain_hour), because now when the daylight-saving went off, the opening hours won't be the same. Maybe it is stupid to try to store opening hours in GMT time anyway, since then the actual opening hour changes. But, how could I test the expect.toBe with multiple values? For now, I could test that expect.toBe(hour_one || hour_two), but that is not supported?


Aucun commentaire:

Enregistrer un commentaire