Skip to content

Commit

Permalink
test(storyshots): fix jest / storybook / stroryshots issue where stor…
Browse files Browse the repository at this point in the history
…ies from node_modules caused in

the require.context files list was including story files from inside node_modules

ISSUES CLOSED: #48
  • Loading branch information
fczuardi committed Oct 16, 2017
1 parent 49509ea commit 64d7056
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { injectGlobal } from "styled-components";
import { configure } from "@storybook/react";

const req = require.context("../", true, /\.story\.js$/);
const req = require.context(
"../",
true,
/^((?![\\/]node_modules).)*\.story\.js$/
);

function loadStories() {
req.keys().forEach(filename => req(filename));
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ install:
- lerna bootstrap
- lerna link
- npx flow-typed install
- yarn add -D jest

script:
- yarn lint
Expand Down

0 comments on commit 64d7056

Please sign in to comment.