Skip to content

Commit

Permalink
fix: Add a hedge in case we ever use Jest with Storybook.
Browse files Browse the repository at this point in the history
See storybookjs/storybook#18399

We don't need this at the moment, but I discovered this while looking
into another Storybook issue, and it seems worth adding now in case we
use Jest in the future, as it is not well documented. (Also, it sounds
like Storybook projects created with recent versions will
automatically add this file.)
  • Loading branch information
dhess committed Oct 18, 2022
1 parent 2126c46 commit 1f1e43d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
// https://github.com/storybookjs/storybook/issues/18399
// Fix: add `jest` to global
window.global = window;
</script>

0 comments on commit 1f1e43d

Please sign in to comment.