Skip to content

Commit

Permalink
Add __BASE_PATH__ definition to storybook config (#25643)
Browse files Browse the repository at this point in the history
* Add __BASE_PATH__ definition to storybook config

* Globals need not be defined for Storybook Docs

Update to Docs: Removes the need to declare the `__BASE_PATH__` and `__PATH_PREFIX__` in the Storybook config for Tests to work
  • Loading branch information
nabeelvalley authored Jul 21, 2020
1 parent 91213b9 commit ca23b39
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/docs/visual-testing-with-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ global.___loader = {
hovering: () => {},
}

// __PATH_PREFIX__ is used inside gatsby-link an other various places. For storybook not to crash, you need to set it as well.
global.__PATH_PREFIX__ = ""

// Navigating through a gatsby app using gatsby-link or any other gatsby component will use the `___navigate` method.
// In Storybook it makes more sense to log an action than doing an actual navigate. Checkout the actions addon docs for more info: https://github.com/storybookjs/storybook/tree/master/addons/actions.

Expand Down

0 comments on commit ca23b39

Please sign in to comment.