Skip to content

Commit

Permalink
Fix nondeterministic timezone for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wdoug committed Nov 17, 2017
1 parent 45b4418 commit 7bda5b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/stories/__tests__/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"globals": {
"jest": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`Storyshots Event Event with customizable props 1`] = `
<h4>
Tuesday, January 1, 1901
|
4:00-7:30 pm UTC
11:00-2:30 am GMT
</h4>
<p>
Galvanize, Golden Triangle, Denver
Expand Down Expand Up @@ -87,7 +87,7 @@ exports[`Storyshots EventRow Event row with customizable props 1`] = `
<div
className="small-12 medium-2 columns"
>
12:00-12:00 am MST
7:00-7:00 am GMT
</div>
<div
className="small-12 medium-5 columns"
Expand Down
3 changes: 3 additions & 0 deletions client/stories/__tests__/storyshots.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import initStoryshots from 'storyshots';
import moment from 'moment-timezone';

moment.tz.guess = jest.fn(() => 'Europe/London');

initStoryshots({
configPath: 'client/stories/snapshotConfig'
Expand Down

0 comments on commit 7bda5b1

Please sign in to comment.