diff --git a/.jestrc b/.jestrc.json similarity index 88% rename from .jestrc rename to .jestrc.json index ba3f86e689f8..9d5dd48c424e 100644 --- a/.jestrc +++ b/.jestrc.json @@ -5,7 +5,10 @@ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", "\\.(css|scss)$": "/__mocks__/styleMock.js" }, - "roots": ["packages"], + "projects": [ + "/packages/*", + "/examples/*" + ], "collectCoverage": false, "collectCoverageFrom": [ "packages/**/*.{js,jsx}", diff --git a/.travis.yml b/.travis.yml index 45039187fb90..7a854e756764 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,5 @@ script: - npm run lint - npm run test -- --coverage - npm run coverage - - npm run test-examples git: depth: 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d616f593a76..ae12b939906d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,10 +76,10 @@ If you follow that process, you can then link to the github repository in the is We welcome your contributions. There are many ways you can help us. This is few of those ways: -* Fix typos and add more documentation. +* Fix typos and add more [documentation](https://github.com/storybooks/storybook/labels/needs%20docs). * Try to fix some [bugs](https://github.com/storybooks/storybook/labels/bug). -* Work on [enhancements](https://github.com/storybooks/storybook/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) and new [features](https://github.com/storybooks/storybook/issues?q=is%3Aissue+is%3Aopen+label%3Afeature). -* Add more tests (specially for the UI). +* Work on [API](https://github.com/storybooks/storybook/labels/enhancement%3A%20api), [Addons](https://github.com/storybooks/storybook/labels/enhancement%3A%20addons), [UI](https://github.com/storybooks/storybook/labels/enhancement%3A%20ui) or [Webpack](https://github.com/storybooks/storybook/labels/enhancement%3A%20webpack) use enhancements and new [features](https://github.com/storybooks/storybook/labels/feature%20request). +* Add more [tests](https://codecov.io/gh/storybooks/storybook/tree/master/packages) (specially for the [UI](https://codecov.io/gh/storybooks/storybook/tree/master/packages/storybook-ui/src)). Before you submit a new PR, make you to run `npm test`. Do not submit a PR if tests are failing. If you need any help, create an issue and ask. diff --git a/examples/cra-storybook/src/stories/Welcome.js b/examples/cra-storybook/src/stories/Welcome.js index 5886c30148ad..50979fcd203d 100644 --- a/examples/cra-storybook/src/stories/Welcome.js +++ b/examples/cra-storybook/src/stories/Welcome.js @@ -97,7 +97,7 @@ export default class Welcome extends React.Component { {' '} Writing Stories diff --git a/examples/test-cra/src/stories/Welcome.js b/examples/test-cra/src/stories/Welcome.js index 5886c30148ad..50979fcd203d 100644 --- a/examples/test-cra/src/stories/Welcome.js +++ b/examples/test-cra/src/stories/Welcome.js @@ -97,7 +97,7 @@ export default class Welcome extends React.Component { {' '} Writing Stories diff --git a/package.json b/package.json index 2c23820c465b..553657eb7e37 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,10 @@ "eslint": "^3.19.0", "eslint-config-airbnb-base": "^11.1.3", "eslint-plugin-import": "^2.2.0", - "eslint-plugin-jest": "^19.0.1", + "eslint-plugin-jest": "^20.0.0", "eslint-plugin-prettier": "^2.0.1", - "jest": "^19.0.2", - "jest-enzyme": "^3.0.1", + "jest": "^20.0.0", + "jest-enzyme": "^3.1.0", "lerna": "2.0.0-rc.4", "prettier": "^1.1.0", "react": "^15.5.4", @@ -29,9 +29,8 @@ "scripts": { "bootstrap": "lerna bootstrap", "lint": "eslint .", - "test": "jest --config ./.jestrc", + "test": "jest --config ./.jestrc.json", "test:watch": "npm test -- --watch", - "test-examples": "CI=true lerna run test", "coverage": "codecov" } } diff --git a/packages/addon-knobs/src/components/PropField.js b/packages/addon-knobs/src/components/PropField.js index 32f5aa01ac43..58bd3f7c2855 100644 --- a/packages/addon-knobs/src/components/PropField.js +++ b/packages/addon-knobs/src/components/PropField.js @@ -19,7 +19,6 @@ const stylesheet = { width: 80, fontSize: 10, color: 'rgb(68, 68, 68)', - textTransform: 'uppercase', fontWeight: 600, }, }; diff --git a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js index 2b20b2a1b4a4..9d106d3dd952 100644 --- a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js +++ b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js @@ -97,7 +97,7 @@ export default class Welcome extends React.Component { {' '} Writing Stories diff --git a/packages/getstorybook/generators/WEBPACK_REACT/template/.storybook/webpack.config.js b/packages/getstorybook/generators/WEBPACK_REACT/template/.storybook/webpack.config.js index 7441c981d232..fae1ef93df48 100644 --- a/packages/getstorybook/generators/WEBPACK_REACT/template/.storybook/webpack.config.js +++ b/packages/getstorybook/generators/WEBPACK_REACT/template/.storybook/webpack.config.js @@ -1,6 +1,6 @@ // you can use this file to add your custom webpack plugins, loaders and anything you like. // This is just the basic way to add addional webpack configurations. -// For more information refer the docs: https://getstorybook.io/docs/configurations/custom-webpack-config +// For more information refer the docs: https://storybooks.js.org/docs/react-storybook/configurations/custom-webpack-config // IMPORTANT // When you add this file, we won't add the default configurations which is similar diff --git a/packages/react-storybook/demo/src/stories/Welcome.js b/packages/react-storybook/demo/src/stories/Welcome.js index 5886c30148ad..50979fcd203d 100644 --- a/packages/react-storybook/demo/src/stories/Welcome.js +++ b/packages/react-storybook/demo/src/stories/Welcome.js @@ -97,7 +97,7 @@ export default class Welcome extends React.Component { {' '} Writing Stories