Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
fix(tests): Quell storybook HMR warnings (#149 by @bryanstearns)
Browse files Browse the repository at this point in the history
The Storybook fix for this issue storybookjs/storybook#1525
adds a warning when `storiesOf` doesn’t have a `module` parameter.

The `module` parameter is necessary to enable hot-module-replacement to work right:
storybookjs/storybook#2022 (comment)

[skip ci]
  • Loading branch information
bryanstearns authored and jamonholmgren committed Mar 11, 2019
1 parent 77d714b commit 5663289
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion boilerplate/app/components/button/button.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const buttonTextStyleArray: TextStyle[] = [
{color: "#a511dc"},
]

storiesOf("Button")
storiesOf("Button", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Style Presets", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/checkbox/checkbox.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const arrayFillStyle: ViewStyle[] = [
{backgroundColor: "#55e0ff"},
]

storiesOf("Checkbox")
storiesOf("Checkbox", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Behaviour", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/form-row/form-row.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const arrayStyle: ViewStyle[] = [
{borderColor: "#32cd32"},
]

storiesOf("FormRow")
storiesOf("FormRow", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Assembled", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/header/header.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const VIEWSTYLE = {
backgroundColor: color.storybookDarkBg,
}

storiesOf("Header")
storiesOf("Header", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Behavior", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/icon/icon.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { storiesOf } from "@storybook/react-native"
import { StoryScreen, Story, UseCase } from "../../../storybook/views"
import { Icon } from "./icon"

storiesOf("Icon")
storiesOf("Icon", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Names", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/switch/switch.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const thumbOnStyle: ViewStyle[] = [
},
]

storiesOf("Switch")
storiesOf("Switch", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Behaviour", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/text-field/text-field.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const inputStyleArray: TextStyle[] = [
]
var alertWhenFocused = true

storiesOf("TextField")
storiesOf("TextField", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Labelling", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/text/text.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const viewStyleArray: ViewStyle[] = [
{backgroundColor: "#7fff00"},
]

storiesOf("Text")
storiesOf("Text", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Style Presets", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/wallpaper/wallpaper.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { storiesOf } from "@storybook/react-native"
import { StoryScreen, Story, UseCase } from "../../../storybook/views"
import { Wallpaper } from "./wallpaper"

storiesOf("Wallpaper")
storiesOf("Wallpaper", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Style Presets", () => (
<Story>
Expand Down
2 changes: 1 addition & 1 deletion templates/component.story.tsx.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { storiesOf } from "@storybook/react-native"
import { StoryScreen, Story, UseCase } from "../../../storybook/views"
import { <%= props.pascalName %> } from "./"

storiesOf("<%= props.pascalName %>")
storiesOf("<%= props.pascalName %>", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
.add("Style Presets", () => (
<Story>
Expand Down

0 comments on commit 5663289

Please sign in to comment.