Skip to content

Commit

Permalink
storybook, tests, template
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestofreyreg committed Nov 23, 2020
1 parent 73548eb commit 57e9896
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path')

module.exports = {
stories: ['../**/*.stories.mdx', '../**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../packages/**/*.stories.mdx', '../packages/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"main": "index.js",
"scripts": {
"test": "jest --coverage",
"storybook": "start-storybook -p 6006",
"test": "echo \"Error: no test specified\" && exit 1"
"storybook": "start-storybook -p 6006"
},
"keywords": [],
"author": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots template/Button Regular 1`] = `
<button
className="Button"
data-testid="button"
onClick={[Function]}
>
This is a Button
</button>
`;
8 changes: 5 additions & 3 deletions packages/app/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
"build": "yarn clean && next build && next export",
"clean": "rimraf .next && rimraf out",
"storybook": "start-storybook -p 6006",
"test": "jest --coverage --config ../../../jest.config.js src/**/* __tests__/**/*",
"test": "jest --coverage --config ../../../jest.config.js ./src/**/* ./__tests__/**/*",
"start": "yarn build && cd out && ws -p 3010"
},
"config": {
"port": 3010,
"path": "/template"
},
"author": "",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"@storybook/react": "^6.1.2"
}
}

0 comments on commit 57e9896

Please sign in to comment.