Skip to content

Commit

Permalink
Merge pull request #1032 from prymitive/mockdate-storybook
Browse files Browse the repository at this point in the history
fix(ci): use fixed date for storybook
  • Loading branch information
prymitive authored Oct 14, 2019
2 parents e0e0194 + b6b9567 commit c47e72e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import { configure, getStorybook, setAddon } from "@storybook/react";

import createPercyAddon from "@percy-io/percy-storybook";

import { advanceTo } from "jest-date-mock";

const { percyAddon, serializeStories } = createPercyAddon();
setAddon(percyAddon);

// mock date so the silence form always shows same preview
advanceTo(new Date(Date.UTC(2018, 7, 14, 17, 36, 40)));

const req = require.context("../src/Components", true, /\.stories\.js$/);

function loadStories() {
Expand Down

0 comments on commit c47e72e

Please sign in to comment.