diff --git a/.gitignore b/.gitignore index 835eb5f2889f..7b04ce6dfe41 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ package-lock.json .nvmrc storybook-static integration/__image_snapshots__/__diff_output__ +.jest-test-results.json + diff --git a/addons/jest/README.md b/addons/jest/README.md new file mode 100644 index 000000000000..67e9b65a0f0b --- /dev/null +++ b/addons/jest/README.md @@ -0,0 +1,129 @@ +# Storybook addon Jest + +Brings Jest results in storybook. + +[![Storybook Jest Addon Demo](@storybook/addon-jest.gif)](https://storybook-addon-jest-example.herokuapp.com/) + +> Checkout the above [Live Storybook](https://storybook-addon-jest-example.herokuapp.com/). + +## Getting started + +### Install + +`npm install --save-dev @storybook/addon-jest` + +or + +`yarn add --dev @storybook/addon-jest` + +### Jest Configuration + +When running **Jest**, be sure to save the results in a json file: + +`package.json` + +```js +"scripts": { + "test:generate-output": "jest --json --outputFile=jest-test-results.json" +} +``` + +You may want to add it the result file to `.gitignore`, since it's a generated file: +``` +jest-test-results.json +``` +But much like lockfiles and snapshots checking-in generated files can have certain advantages as well. It's up to you. +We recommend to **do** check in the test results file so starting storybook from an clean git clone doesn't require running all tests first, +but this can mean you'll experience merge conflicts on this file in the future. (*re-generating this file is super easy though, just like lockfiles and snapshots*) + +## Generating the test results + +You need to make sure the generated test-restuls file exists before you start storybook. +During development you will likely start jest in watch-mode +and so the json file will be re-generated every time code or tests change. + +```sh +npm run test:generate-output -- --watch +``` + +This change will then be HMR (hot module reloaded) using webpack and displayed by this addon. + +If you want to pre-run jest automaticly during development or a static build, +you may need to consider that if your tests fail, the script receives a non-0 exit code and will exit. +You could create a `prebuild:storybook` npm script, which will never fail by appending `|| true`: +```json +"scripts": { + "test:generate-output": "jest --json --outputFile=.jest-test-results.json || true", + "test": "jest", + "prebuild:storybook": "npm run test:generate-output", + "build:storybook": "build-storybook -c .storybook -o build/", + "predeploy": "npm run build:storybook", + "deploy": "gh-pages -d build/", +} +``` + +### Register + +Register addon at `.storybook/addons.js` + +```js +import '@storybook/addon-jest/register'; +``` + +## Usage + +Assuming that you have created a test files `MyComponent.test.js` and `MyOtherComponent.test.js` + +In your `story.js` + +```js +import jestTestResults from '../.jest-test-results.json'; +import withTests from '@storybook/addon-jest'; + +storiesOf('MyComponent', module) + .addDecorator(withTests(jestTestResults, { filesExt: '.test.js' })('MyComponent', 'MyOtherComponent')) + .add('This story shows test results from MyComponent.test.js and MyOtherComponent.test.js', () => ( +
Jest results in storybook
+ )); +``` + +Or in order to avoid importing `.jest-test-results.json` in each story, you can create a simple file `withTests.js`: + +```js +import jestTestResults from '../.jest-test-results.json'; +import withTests from '@storybook/addon-jest'; + +export default withTests(jestTestResults, { + filesExt: '.test.js', +}); +``` + +Then in your story: + +```js +// import your file +import withTests from '.withTests'; + +storiesOf('MyComponent', module) + .addDecorator(withTests('MyComponent', 'MyOtherComponent')) + .add('This story shows test results from MyComponent.test.js and MyOtherComponent.test.js', () => ( +
Jest results in storybook
+ )); +``` + +## TODO + +- [ ] Add coverage +- [ ] Display nested test better (describe) +- [ ] Display the date of the test +- [ ] Add unit tests +- [ ] Add linting +- [ ] Split + +## Contributing + +Every ideas and contributions are welcomed. + +## Licence + +MIT © 2017-present Renaud Tertrais diff --git a/addons/jest/docs/storybook-addon-jest.gif b/addons/jest/docs/storybook-addon-jest.gif new file mode 100644 index 000000000000..a2f7152536b7 Binary files /dev/null and b/addons/jest/docs/storybook-addon-jest.gif differ diff --git a/addons/jest/package.json b/addons/jest/package.json new file mode 100644 index 000000000000..440bd5b2da6b --- /dev/null +++ b/addons/jest/package.json @@ -0,0 +1,42 @@ +{ + "name": "@storybook/addon-jest", + "version": "3.2.16", + "description": "React storybook addon that show component jest report", + "keywords": [ + "addon", + "jest", + "react", + "report", + "results", + "storybook", + "unit-testing" + ], + "homepage": "https://storybook.js.org", + "bugs": "https://github.com/storybooks/storybook", + "license": "MIT", + "author": "Renaud Tertrais (https://github.com/renaudtertrais)", + "main": "dist/index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/storybooks/storybook" + }, + "scripts": { + "prepare": "node ../../scripts/prepare.js" + }, + "dependencies": { + "@storybook/components": "^3.2.16", + "global": "^4.3.2", + "prop-types": "^15.6.0", + "glamor": "^2.20.40", + "glamorous": "^4.11.0" + }, + "devDependencies": { + "react": "^16.1.0", + "react-dom": "^16.1.0" + }, + "peerDependencies": { + "@storybook/addons": "^3.2.16", + "react": "*", + "react-dom": "*" + } +} diff --git a/addons/jest/register.js b/addons/jest/register.js new file mode 100644 index 000000000000..cc38cb06f1f2 --- /dev/null +++ b/addons/jest/register.js @@ -0,0 +1 @@ +require('./dist/register'); diff --git a/addons/jest/src/colors.js b/addons/jest/src/colors.js new file mode 100644 index 000000000000..ce47df110e82 --- /dev/null +++ b/addons/jest/src/colors.js @@ -0,0 +1,6 @@ +export default { + success: 'LIGHTSEAGREEN', + error: 'CRIMSON', + warning: 'DARKORANGE', + grey: 'LIGHTSLATEGRAY', +}; diff --git a/addons/jest/src/components/Indicator.js b/addons/jest/src/components/Indicator.js new file mode 100644 index 000000000000..0f00dcb73efe --- /dev/null +++ b/addons/jest/src/components/Indicator.js @@ -0,0 +1,35 @@ +import PropTypes from 'prop-types'; + +import glamorous from 'glamorous'; + +const Indicator = glamorous.div( + ({ color, size }) => ({ + boxSizing: 'border-box', + padding: `0 ${size / 2}px`, + minWidth: size, + minHeight: size, + fontSize: size / 1.4, + lineHeight: `${size}px`, + color: 'white', + textTransform: 'uppercase', + borderRadius: size / 2, + backgroundColor: color, + }), + ({ styles }) => ({ + ...styles, + }) +); + +Indicator.defaultProps = { + right: false, + children: '', +}; + +Indicator.propTypes = { + color: PropTypes.string.isRequired, + size: PropTypes.number.isRequired, + children: PropTypes.node, + right: PropTypes.bool, +}; + +export default Indicator; diff --git a/addons/jest/src/components/Panel.js b/addons/jest/src/components/Panel.js new file mode 100644 index 000000000000..deda4999b70e --- /dev/null +++ b/addons/jest/src/components/Panel.js @@ -0,0 +1,160 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import glamorous from 'glamorous'; + +import { baseFonts } from '@storybook/components'; + +import Indicator from './Indicator'; +import Result, { FailedResult } from './Result'; +import provideJestResult from '../hoc/provideJestResult'; +import colors from '../colors'; + +const List = glamorous.ul({ + listStyle: 'none', + fontSize: 14, + padding: 0, + margin: '10px 0', +}); + +const Item = glamorous.li({ + display: 'block', + margin: '10px 0', + padding: 0, +}); + +const NoTests = glamorous.div({ + padding: '10px 20px', + flex: 1, + ...baseFonts, +}); + +const FileTitle = glamorous.h2({ + margin: 0, + fontWeight: 500, + fontSize: 18, +}); + +const SuiteHead = glamorous.div({ + display: 'flex', + alignItems: 'baseline', + justifyContent: 'space-between', + position: 'relative', + paddingTop: 10, +}); + +const SuiteTotals = glamorous(({ successNumber, failedNumber, result, className }) => ( +
+ {successNumber > 0 &&
{successNumber} passed
} + {failedNumber > 0 &&
{failedNumber} failed
} +
{result.assertionResults.length} total
+
+ {result.endTime - result.startTime}ms +
+
+))({ + display: 'flex', + alignItems: 'center', + color: colors.grey, + fontSize: '10px', + + '& > *': { + marginLeft: 10, + }, +}); + +const SuiteProgress = glamorous(({ successNumber, result, className }) => ( +
+ + {`${successNumber / result.assertionResults.length * 100}%`} + +
+))(() => ({ + width: '100%', + backgroundColor: colors.error, + height: 4, + top: 0, + position: 'absolute', + left: 0, + borderRadius: 3, + overflow: 'hidden', + appearance: 'none', + + '& > span': { + backgroundColor: colors.success, + bottom: 0, + position: 'absolute', + left: 0, + top: 0, + boxShadow: '4px 0 0 white', + }, +})); + +const SuiteTitle = glamorous.div({ + display: 'flex', + alignItems: 'center', +}); + +const Content = glamorous(({ tests, className }) => ( +
+ {tests.map(({ name, result }) => { + if (!result) { + return This story has tests configures, but no file not found; + } + + const successNumber = result.assertionResults.filter(({ status }) => status === 'passed') + .length; + const failedNumber = result.assertionResults.length - successNumber; + + return ( +
+ + + + {result.status} + + {name} + + + + + + {result.assertionResults.map(res => ( + + {res.failureMessages && res.failureMessages.length ? ( + + ) : ( + + )} + + ))} + +
+ ); + })} +
+))({ + padding: '10px 20px', + flex: '1 1 0%', + ...baseFonts, +}); + +const Panel = ({ tests }) => + tests ? : This story has no tests configures; + +Panel.defaultProps = { + tests: null, +}; + +Panel.propTypes = { + tests: PropTypes.arrayOf( + PropTypes.shape({ + result: PropTypes.object, + }) + ), +}; + +export default provideJestResult(Panel); diff --git a/addons/jest/src/components/PanelTitle.js b/addons/jest/src/components/PanelTitle.js new file mode 100644 index 000000000000..ba51f6dd0bf6 --- /dev/null +++ b/addons/jest/src/components/PanelTitle.js @@ -0,0 +1,47 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import glamorous from 'glamorous'; + +import provideJestResult from '../hoc/provideJestResult'; +import Indicator from './Indicator'; +import colors from '../colors'; + +const Wrapper = glamorous.div({ + display: 'flex', + alignItems: 'center', +}); +const PanelName = glamorous.div({ + paddingLeft: 5, +}); + +const PanelTitle = ({ tests }) => { + if (!tests) { + return null; + } + + const results = tests.map(report => report.result).filter(report => !!report); + const success = results.reduce((acc, result) => acc && result.status === 'passed', true); + const color = success ? colors.success : colors.error; + + return ( + + + Tests + + ); +}; + +PanelTitle.defaultProps = { + tests: null, +}; + +PanelTitle.propTypes = { + tests: PropTypes.arrayOf( + PropTypes.shape({ + result: PropTypes.object, + }) + ), +}; + +export default provideJestResult(PanelTitle); diff --git a/addons/jest/src/components/Result.js b/addons/jest/src/components/Result.js new file mode 100644 index 000000000000..fa71b0b17d37 --- /dev/null +++ b/addons/jest/src/components/Result.js @@ -0,0 +1,252 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import glamorous from 'glamorous'; +import { monoFonts } from '@storybook/components'; + +import Indicator from './Indicator'; +import colors from '../colors'; + +const Pre = glamorous.pre({ + margin: 0, + ...monoFonts, +}); + +const FlexContainer = glamorous.div` + display: flex; + align-items: center; +`; + +/* eslint no-control-regex:0 */ +const patterns = [/^\x08+/, /^\x1b\[[012]?K/, /^\x1b\[?[\d;]{0,3}/]; + +const Positive = glamorous.strong({ + color: colors.success, + fontWeight: 500, +}); +const Negative = glamorous.strong({ + color: colors.error, + fontWeight: 500, +}); +const StackTrace = glamorous(({ trace, className }) => ( +
+ Callstack + {trace + .join('') + .trim() + .split(/\n/) + .map(i =>
{i.trim()}
)} +
+))({ + background: 'silver', + padding: 10, +}); +const Main = glamorous(({ msg, className }) =>
{msg}
)({ + padding: 10, + borderBottom: '1px solid silver', +}); +const Sub = glamorous(({ msg, className }) => ( +
+ {msg + .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.trim() !== '')) + .map((item, index, list) => { + switch (true) { + case typeof item === 'string' && index === 0 && index === list.length - 1: { + return item.trim(); + } + case typeof item === 'string' && index === 0: { + return item.replace(/^[\s\n]*/, ''); + } + case typeof item === 'string' && index === list.length - 1: { + debugger; //eslint-disable-line + return item.replace(/[\s\n]*$/, ''); + } + default: { + return item; + } + } + // typeof item === 'string' ? {item} : item; + })} +
+))({ + padding: 10, +}); + +const createSubgroup = (acc, item, i, list) => { + // setup aggregators + if (!acc.list) { + acc.list = []; + } + if (!acc.grouped) { + acc.grouped = []; + } + + // start or stop extraction + if (acc.startTrigger(item)) { + // debugger; //eslint-disable-line + acc.mode = 'inject'; + acc.injectionPoint = i; + } + if (acc.endTrigger(item)) { + acc.mode = 'stop'; + } + + // push item in correct aggregator + if (acc.mode === 'inject') { + acc.grouped.push(item); + } else { + acc.list.push(item); + } + + // on last iteration inject at detected injectionpoint, and group + if (i === list.length - 1) { + return acc.list.reduce((eacc, el, ei) => { + switch (true) { + case acc.injectionPoint === 0 && ei === 0: { + // at index 0, inject before + return eacc.concat(acc.grouper(acc.grouped)).concat(el); + } + case acc.injectionPoint > 0 && acc.injectionPoint === ei + 1: { + // at index > 0, and next index WOULD BE injectionPoint, inject after + return eacc.concat(el).concat(acc.grouper(acc.grouped)); + } + default: { + // do not inject + return eacc.concat(el); + } + } + }, []); + } + return acc; +}; + +const Message = ({ msg }) => { + const data = patterns + .reduce((acc, regex) => acc.replace(regex, ''), msg) + .split(/\[2m/) + .join('') + .split(/\[22m/) + .reduce((acc, item) => acc.concat(item), []) + .map( + (item, li) => + typeof item === 'string' + ? item + .split(/\[32m(.*?)\[39m/) + // eslint-disable-next-line react/no-array-index-key + .map((i, index) => (index % 2 ? {i} : i)) + : item + ) + .reduce((acc, item) => acc.concat(item), []) + .map( + (item, li) => + typeof item === 'string' + ? item + .split(/\[31m(.*?)\[39m/) + // eslint-disable-next-line react/no-array-index-key + .map((i, index) => (index % 2 ? {i} : i)) + : item + ) + .reduce((acc, item) => acc.concat(item), []) + .reduce(createSubgroup, { + startTrigger: e => typeof e === 'string' && e.indexOf('Error: ') === 0, + endTrigger: e => typeof e === 'string' && e.match('Expected '), + grouper: list =>
, + }) + .reduce( + (acc, it) => + typeof it === 'string' ? acc.concat(it.split(/(at(.|\n)+\d+:\d+\))/)) : acc.concat(it), + [] + ) + .reduce((acc, item) => acc.concat(item), []) + .reduce(createSubgroup, { + startTrigger: e => typeof e === 'string' && e.indexOf('Expected ') !== -1, + endTrigger: e => typeof e === 'string' && e.match(/^at/), + grouper: list => , + }) + .reduce(createSubgroup, { + startTrigger: e => typeof e === 'string' && e.match(/at(.|\n)+\d+:\d+\)/), + endTrigger: () => false, + grouper: list => , + }); + + return
{data}
; +}; +Message.propTypes = { + msg: PropTypes.string.isRequired, +}; + +const Head = glamorous.header({ + display: 'flex', + justifyContent: 'space-between', + alignItems: 'flex-start', +}); + +const Title = glamorous.h3({ + padding: '10px 10px 0 10px', + margin: 0, +}); + +export const FailedResult = glamorous(({ fullName, title, status, failureMessages, className }) => ( +
+ + + + {fullName || title} + + + {status} + + + {/* eslint-disable react/no-array-index-key */} + {failureMessages.map((msg, i) => )} +
+))({ + display: 'block', + borderRadius: 5, + margin: 0, + padding: 0, + position: 'relative', + border: '1px solid silver', + boxSizing: 'border-box', +}); + +const Result = ({ fullName, title, status }) => ( +
+ + +
{fullName || title}
+
+ + + {status} + + +
+); + +Result.defaultProps = { + fullName: '', + title: '', +}; + +Result.propTypes = { + fullName: PropTypes.string, + title: PropTypes.string, + status: PropTypes.string.isRequired, +}; + +export default Result; diff --git a/addons/jest/src/hoc/provideJestResult.js b/addons/jest/src/hoc/provideJestResult.js new file mode 100644 index 000000000000..aec752bc7e0a --- /dev/null +++ b/addons/jest/src/hoc/provideJestResult.js @@ -0,0 +1,50 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const provideTests = Component => { + class TestProvider extends React.Component { + static propTypes = { + channel: PropTypes.shape({ + on: PropTypes.func, + removeListener: PropTypes.func, + }).isRequired, + api: PropTypes.shape({ + onStory: PropTypes.func, + }).isRequired, + }; + + constructor(props) { + super(props); + + this.state = {}; + this.onAddTests = this.onAddTests.bind(this); + } + + componentDidMount() { + this.stopListeningOnStory = this.props.api.onStory(() => { + this.onAddTests({}); + }); + + this.props.channel.on('storybook/tests/add_tests', this.onAddTests); + } + + componentWillUnmount() { + if (this.stopListeningOnStory) { + this.stopListeningOnStory(); + } + this.props.channel.removeListener('storybook/tests/add_tests', this.onAddTests); + } + + onAddTests({ kind, storyName, tests }) { + this.setState({ kind, storyName, tests }); + } + + render() { + return ; + } + } + + return TestProvider; +}; + +export default provideTests; diff --git a/addons/jest/src/index.js b/addons/jest/src/index.js new file mode 100644 index 000000000000..e302a7a0f077 --- /dev/null +++ b/addons/jest/src/index.js @@ -0,0 +1,35 @@ +import addons from '@storybook/addons'; + +const findTestResults = (testFiles, jestTestResults, jestTestFilesExt) => + testFiles.map(name => { + if (jestTestResults && jestTestResults.testResults) { + return { + name, + result: jestTestResults.testResults.find(t => + new RegExp(`${name}${jestTestFilesExt}`).test(t.name) + ), + }; + } + return { name }; + }); + +const emitAddTests = ({ kind, story, testFiles, options }) => { + addons.getChannel().emit('storybook/tests/add_tests', { + kind, + storyName: story, + tests: findTestResults(testFiles, options.results, options.filesExt), + }); +}; + +export const withTests = userOptions => { + const defaultOptions = { + filesExt: '((\\.specs?)|(\\.tests?))?(\\.js)?$', + }; + const options = Object.assign({}, defaultOptions, userOptions); + + return (...testFiles) => (storyFn, { kind, story }) => { + emitAddTests({ kind, story, testFiles, options }); + + return storyFn(); + }; +}; diff --git a/addons/jest/src/register.js b/addons/jest/src/register.js new file mode 100644 index 000000000000..8abcc1b9dfe8 --- /dev/null +++ b/addons/jest/src/register.js @@ -0,0 +1,15 @@ +/* eslint-disable react/no-danger */ +import React from 'react'; +import addons from '@storybook/addons'; + +import PanelTitle from './components/PanelTitle'; +import Panel from './components/Panel'; + +// Register the addon with a unique name. +addons.register('storybook/tests', api => { + // Also need to set a unique name to the panel. + addons.addPanel('storybook/tests/panel', { + title: , + render: () => , + }); +}); diff --git a/addons/jest/src/styles.js b/addons/jest/src/styles.js new file mode 100644 index 000000000000..c437b6ebf146 --- /dev/null +++ b/addons/jest/src/styles.js @@ -0,0 +1,573 @@ +import { document } from 'global'; + +const styles = ` + @font-face { + font-family: octicons-link; + src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff'); + } + .markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + line-height: 1.5; + color: #333; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; + } + .markdown-body .pl-c { + color: #969896; + } + .markdown-body .pl-c1, + .markdown-body .pl-s .pl-v { + color: #0086b3; + } + .markdown-body .pl-e, + .markdown-body .pl-en { + color: #795da3; + } + .markdown-body .pl-smi, + .markdown-body .pl-s .pl-s1 { + color: #333; + } + .markdown-body .pl-ent { + color: #63a35c; + } + .markdown-body .pl-k { + color: #a71d5d; + } + .markdown-body .pl-s, + .markdown-body .pl-pds, + .markdown-body .pl-s .pl-pse .pl-s1, + .markdown-body .pl-sr, + .markdown-body .pl-sr .pl-cce, + .markdown-body .pl-sr .pl-sre, + .markdown-body .pl-sr .pl-sra { + color: #183691; + } + .markdown-body .pl-v { + color: #ed6a43; + } + .markdown-body .pl-id { + color: #b52a1d; + } + .markdown-body .pl-ii { + color: #f8f8f8; + background-color: #b52a1d; + } + .markdown-body .pl-sr .pl-cce { + font-weight: bold; + color: #63a35c; + } + .markdown-body .pl-ml { + color: #693a17; + } + .markdown-body .pl-mh, + .markdown-body .pl-mh .pl-en, + .markdown-body .pl-ms { + font-weight: bold; + color: #1d3e81; + } + .markdown-body .pl-mq { + color: #008080; + } + .markdown-body .pl-mi { + font-style: italic; + color: #333; + } + .markdown-body .pl-mb { + font-weight: bold; + color: #333; + } + .markdown-body .pl-md { + color: #bd2c00; + background-color: #ffecec; + } + .markdown-body .pl-mi1 { + color: #55a532; + background-color: #eaffea; + } + .markdown-body .pl-mdr { + font-weight: bold; + color: #795da3; + } + .markdown-body .pl-mo { + color: #1d3e81; + } + .markdown-body .octicon { + display: inline-block; + vertical-align: text-top; + fill: currentColor; + } + .markdown-body a { + background-color: transparent; + -webkit-text-decoration-skip: objects; + } + .markdown-body a:active, + .markdown-body a:hover { + outline-width: 0; + } + .markdown-body strong { + font-weight: inherit; + } + .markdown-body strong { + font-weight: bolder; + } + .markdown-body h1 { + font-size: 2em; + margin: 0.67em 0; + } + .markdown-body img { + border-style: none; + } + .markdown-body svg:not(:root) { + overflow: hidden; + } + .markdown-body code, + .markdown-body kbd, + .markdown-body pre { + font-family: monospace, monospace; + font-size: 1em; + } + .markdown-body hr { + box-sizing: content-box; + height: 0; + overflow: visible; + } + .markdown-body input { + font: inherit; + margin: 0; + } + .markdown-body input { + overflow: visible; + } + .markdown-body [type="checkbox"] { + box-sizing: border-box; + padding: 0; + } + .markdown-body * { + box-sizing: border-box; + } + .markdown-body input { + font-family: inherit; + font-size: inherit; + line-height: inherit; + } + .markdown-body a { + color: #4078c0; + text-decoration: none; + } + .markdown-body a:hover, + .markdown-body a:active { + text-decoration: underline; + } + .markdown-body strong { + font-weight: 600; + } + .markdown-body hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #ddd; + } + .markdown-body hr::before { + display: table; + content: ""; + } + .markdown-body hr::after { + display: table; + clear: both; + content: ""; + } + .markdown-body table { + border-spacing: 0; + border-collapse: collapse; + } + .markdown-body td, + .markdown-body th { + padding: 0; + } + .markdown-body h1, + .markdown-body h2, + .markdown-body h3, + .markdown-body h4, + .markdown-body h5, + .markdown-body h6 { + margin-top: 0; + margin-bottom: 0; + } + .markdown-body h1 { + font-size: 32px; + font-weight: 600; + } + .markdown-body h2 { + font-size: 24px; + font-weight: 600; + } + .markdown-body h3 { + font-size: 20px; + font-weight: 600; + } + .markdown-body h4 { + font-size: 16px; + font-weight: 600; + } + .markdown-body h5 { + font-size: 14px; + font-weight: 600; + } + .markdown-body h6 { + font-size: 12px; + font-weight: 600; + } + .markdown-body p { + margin-top: 0; + margin-bottom: 10px; + } + .markdown-body blockquote { + margin: 0; + } + .markdown-body ul, + .markdown-body ol { + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + } + .markdown-body ol ol, + .markdown-body ul ol { + list-style-type: lower-roman; + } + .markdown-body ul ul ol, + .markdown-body ul ol ol, + .markdown-body ol ul ol, + .markdown-body ol ol ol { + list-style-type: lower-alpha; + } + .markdown-body dd { + margin-left: 0; + } + .markdown-body code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; + } + .markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; + } + .markdown-body .octicon { + vertical-align: text-bottom; + } + .markdown-body input { + -webkit-font-feature-settings: "liga" 0; + font-feature-settings: "liga" 0; + } + .markdown-body::before { + display: table; + content: ""; + } + .markdown-body::after { + display: table; + clear: both; + content: ""; + } + .markdown-body>*:first-child { + margin-top: 0 !important; + } + .markdown-body>*:last-child { + margin-bottom: 0 !important; + } + .markdown-body a:not([href]) { + color: inherit; + text-decoration: none; + } + .markdown-body .anchor { + float: left; + padding-right: 4px; + margin-left: -20px; + line-height: 1; + } + .markdown-body .anchor:focus { + outline: none; + } + .markdown-body p, + .markdown-body blockquote, + .markdown-body ul, + .markdown-body ol, + .markdown-body dl, + .markdown-body table, + .markdown-body pre { + margin-top: 0; + margin-bottom: 16px; + } + .markdown-body hr { + height: 0.25em; + padding: 0; + margin: 24px 0; + background-color: #e7e7e7; + border: 0; + } + .markdown-body blockquote { + padding: 0 1em; + color: #777; + border-left: 0.25em solid #ddd; + } + .markdown-body blockquote>:first-child { + margin-top: 0; + } + .markdown-body blockquote>:last-child { + margin-bottom: 0; + } + .markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; + } + .markdown-body h1, + .markdown-body h2, + .markdown-body h3, + .markdown-body h4, + .markdown-body h5, + .markdown-body h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: 600; + line-height: 1.25; + } + .markdown-body h1 .octicon-link, + .markdown-body h2 .octicon-link, + .markdown-body h3 .octicon-link, + .markdown-body h4 .octicon-link, + .markdown-body h5 .octicon-link, + .markdown-body h6 .octicon-link { + color: #000; + vertical-align: middle; + visibility: hidden; + } + .markdown-body h1:hover .anchor, + .markdown-body h2:hover .anchor, + .markdown-body h3:hover .anchor, + .markdown-body h4:hover .anchor, + .markdown-body h5:hover .anchor, + .markdown-body h6:hover .anchor { + text-decoration: none; + } + .markdown-body h1:hover .anchor .octicon-link, + .markdown-body h2:hover .anchor .octicon-link, + .markdown-body h3:hover .anchor .octicon-link, + .markdown-body h4:hover .anchor .octicon-link, + .markdown-body h5:hover .anchor .octicon-link, + .markdown-body h6:hover .anchor .octicon-link { + visibility: visible; + } + .markdown-body h1 { + padding-bottom: 0.3em; + font-size: 2em; + border-bottom: 1px solid #eee; + } + .markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.5em; + border-bottom: 1px solid #eee; + } + .markdown-body h3 { + font-size: 1.25em; + } + .markdown-body h4 { + font-size: 1em; + } + .markdown-body h5 { + font-size: 0.875em; + } + .markdown-body h6 { + font-size: 0.85em; + color: #777; + } + .markdown-body ul, + .markdown-body ol { + padding-left: 2em; + } + .markdown-body ul ul, + .markdown-body ul ol, + .markdown-body ol ol, + .markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; + } + .markdown-body li>p { + margin-top: 16px; + } + .markdown-body li+li { + margin-top: 0.25em; + } + .markdown-body dl { + padding: 0; + } + .markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; + } + .markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; + } + .markdown-body table { + display: block; + width: 100%; + overflow: auto; + } + .markdown-body table th { + font-weight: bold; + } + .markdown-body table th, + .markdown-body table td { + padding: 6px 13px; + border: 1px solid #ddd; + } + .markdown-body table tr { + background-color: #fff; + border-top: 1px solid #ccc; + } + .markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; + } + .markdown-body img { + max-width: 100%; + box-sizing: content-box; + background-color: #fff; + } + .markdown-body code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,0.04); + border-radius: 3px; + } + .markdown-body code::before, + .markdown-body code::after { + letter-spacing: -0.2em; + content: "\00a0"; + } + .markdown-body pre { + word-wrap: normal; + } + .markdown-body pre>code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; + } + .markdown-body .highlight { + margin-bottom: 16px; + } + .markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; + } + .markdown-body .highlight pre, + .markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; + } + .markdown-body pre code { + display: inline; + max-width: auto; + padding: 0; + margin: 0; + overflow: visible; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; + } + .markdown-body pre code::before, + .markdown-body pre code::after { + content: normal; + } + .markdown-body .pl-0 { + padding-left: 0 !important; + } + .markdown-body .pl-1 { + padding-left: 3px !important; + } + .markdown-body .pl-2 { + padding-left: 6px !important; + } + .markdown-body .pl-3 { + padding-left: 12px !important; + } + .markdown-body .pl-4 { + padding-left: 24px !important; + } + .markdown-body .pl-5 { + padding-left: 36px !important; + } + .markdown-body .pl-6 { + padding-left: 48px !important; + } + .markdown-body .full-commit .btn-outline:not(:disabled):hover { + color: #4078c0; + border: 1px solid #4078c0; + } + .markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; + } + .markdown-body :checked+.radio-label { + position: relative; + z-index: 1; + border-color: #4078c0; + } + .markdown-body .task-list-item { + list-style-type: none; + } + .markdown-body .task-list-item+.task-list-item { + margin-top: 3px; + } + .markdown-body .task-list-item input { + margin: 0 0.2em 0.25em -1.6em; + vertical-align: middle; + } + .markdown-body hr { + border-bottom-color: #eee; + } +`; + +if (document && !document.getElementById('github-markdown-css')) { + const styleNode = document.createElement('style'); + styleNode.id = 'github-markdown-css'; + styleNode.innerHTML = styles; + + document.head.appendChild(styleNode); +} diff --git a/addons/jest/styles.js b/addons/jest/styles.js new file mode 100644 index 000000000000..982701f3d9ec --- /dev/null +++ b/addons/jest/styles.js @@ -0,0 +1 @@ +require('./dist/styles'); diff --git a/examples/cra-kitchen-sink/.storybook/addons.js b/examples/cra-kitchen-sink/.storybook/addons.js index 123129bf9428..55875383363f 100644 --- a/examples/cra-kitchen-sink/.storybook/addons.js +++ b/examples/cra-kitchen-sink/.storybook/addons.js @@ -6,3 +6,4 @@ import '@storybook/addon-options/register'; import '@storybook/addon-knobs/register'; import '@storybook/addon-backgrounds/register'; import '@storybook/addon-a11y/register'; +import '@storybook/addon-jest/register'; diff --git a/examples/cra-kitchen-sink/__mocks__/fileMock.js b/examples/cra-kitchen-sink/__mocks__/fileMock.js new file mode 100644 index 000000000000..105ff49748fa --- /dev/null +++ b/examples/cra-kitchen-sink/__mocks__/fileMock.js @@ -0,0 +1 @@ +module.exports = 'file-stub'; diff --git a/examples/cra-kitchen-sink/__mocks__/styleMock.js b/examples/cra-kitchen-sink/__mocks__/styleMock.js new file mode 100644 index 000000000000..f053ebf7976e --- /dev/null +++ b/examples/cra-kitchen-sink/__mocks__/styleMock.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index 48e50511a967..7717d9e0df54 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -7,7 +7,8 @@ "eject": "react-scripts eject", "start": "react-scripts start", "storybook": "start-storybook -p 9010 -s public", - "test": "react-scripts test --env=jsdom" + "test": "react-scripts test --env=jsdom", + "generate-addon-jest-testresults": "jest src/stories/addon-jest.test.js --env=jsdom --json --outputFile=src/stories/addon-jest.testresults.json" }, "dependencies": { "eventemitter3": "^2.0.3", @@ -27,6 +28,7 @@ "@storybook/addon-centered": "^3.2.16", "@storybook/addon-events": "^3.2.16", "@storybook/addon-info": "^3.2.16", + "@storybook/addon-jest": "^3.2.16", "@storybook/addon-knobs": "^3.2.16", "@storybook/addon-links": "^3.2.16", "@storybook/addon-notes": "^3.2.16", @@ -35,7 +37,31 @@ "@storybook/addons": "^3.2.16", "@storybook/components": "^3.2.16", "@storybook/react": "^3.2.16", + "babel-jest": "^21.2.0", + "jest": "^21.2.1", "react-scripts": "1.0.17" }, - "private": true + "private": true, + "jest": { + "verbose": true, + "coverageDirectory": "coverage/", + "notify": true, + "transform": { + ".*": "babel-jest" + }, + "moduleNameMapper": { + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", + "\\.s?css$": "/__mocks__/styleMock.js" + }, + "collectCoverage": true, + "collectCoverageFrom": [ + "src/**/*.js", + "src/*.js", + "!src/.*", + "!src/__test__/*", + "!src/**/__test__/*", + "!src/**/index.js", + "!src/**/story.js" + ] + } } diff --git a/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap b/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap index 950ae0406fcb..672616b567aa 100644 --- a/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap +++ b/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap @@ -5135,6 +5135,14 @@ exports[`Storyshots Addon a11y Label 1`] = ` `; +exports[`Storyshots Addon jest withTests 1`] = ` +
+

+ Hello +

+
+`; + exports[`Storyshots App full app 1`] = `
( +
+

Hello

+
+ )); diff --git a/examples/cra-kitchen-sink/src/stories/addon-jest.test.js b/examples/cra-kitchen-sink/src/stories/addon-jest.test.js new file mode 100644 index 000000000000..4484b71f1e0b --- /dev/null +++ b/examples/cra-kitchen-sink/src/stories/addon-jest.test.js @@ -0,0 +1,31 @@ +test('true should be true', () => { + expect(true).toBe(true); +}); + +describe('In a describe: ', () => { + test('true should still be true', () => { + expect(true).toBe(true); + }); + + test('a list should contain 3 items', () => { + expect(['a', 'b', '3']).toHaveLength(3); + }); + + test('everything is awesome', () => { + expect('everything is all right').toEqual('everything is awesome'); + }); +}); + +describe('A bunch of failing tests: ', () => { + test('true should still be true', () => { + expect(true).toBe(false); + }); + + test('a list should contain 3 items', () => { + expect(['a', 'b', '3']).toContain(301); + }); + + test('should work', () => { + expect(() => {}).toThrow(); + }); +}); diff --git a/examples/cra-kitchen-sink/src/stories/addon-jest.testresults.json b/examples/cra-kitchen-sink/src/stories/addon-jest.testresults.json new file mode 100644 index 000000000000..3747c3821259 --- /dev/null +++ b/examples/cra-kitchen-sink/src/stories/addon-jest.testresults.json @@ -0,0 +1 @@ +{"numFailedTestSuites":1,"numFailedTests":4,"numPassedTestSuites":0,"numPassedTests":3,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTotalTestSuites":1,"numTotalTests":7,"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"unmatched":0,"updated":0},"startTime":1510879394442,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"true should be true","status":"passed","title":"true should be true"},{"ancestorTitles":["In a describe: "],"failureMessages":[],"fullName":"In a describe: true should still be true","status":"passed","title":"true should still be true"},{"ancestorTitles":["In a describe: "],"failureMessages":[],"fullName":"In a describe: a list should contain 3 items","status":"passed","title":"a list should contain 3 items"},{"ancestorTitles":["In a describe: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n\nExpected value to equal:\n \u001b[32m\"everything is awesome\"\u001b[39m\nReceived:\n \u001b[31m\"everything is all right\"\u001b[39m\n at Object. (/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.test.js:15:39)\n at Object.asyncFn (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine_async.js:124:345)\n at resolve (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:46:12)\n at new Promise ()\n at mapper (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:34:499)\n at promise.then (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:74:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)"],"fullName":"In a describe: everything is awesome","status":"failed","title":"everything is awesome"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toBe(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n\nExpected value to be (using ===):\n \u001b[32mfalse\u001b[39m\nReceived:\n \u001b[31mtrue\u001b[39m\n at Object. (/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.test.js:21:18)\n at Object.asyncFn (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine_async.js:124:345)\n at resolve (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:46:12)\n at new Promise ()\n at mapper (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:34:499)\n at promise.then (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:74:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)"],"fullName":"A bunch of failing tests: true should still be true","status":"failed","title":"true should still be true"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31marray\u001b[39m\u001b[2m).toContain(\u001b[22m\u001b[32mvalue\u001b[39m\u001b[2m)\u001b[22m\n\nExpected array:\n \u001b[31m[\"a\", \"b\", \"3\"]\u001b[39m\nTo contain value:\n \u001b[32m301\u001b[39m\n at Object. (/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.test.js:25:29)\n at Object.asyncFn (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine_async.js:124:345)\n at resolve (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:46:12)\n at new Promise ()\n at mapper (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:34:499)\n at promise.then (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:74:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)"],"fullName":"A bunch of failing tests: a list should contain 3 items","status":"failed","title":"a list should contain 3 items"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mfunction\u001b[39m\u001b[2m).toThrow(\u001b[22m\u001b[32mundefined\u001b[39m\u001b[2m)\u001b[22m\n\nExpected the function to throw an error.\nBut it didn't throw anything.\n at Object. (/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.test.js:29:28)\n at Object.asyncFn (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine_async.js:124:345)\n at resolve (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:46:12)\n at new Promise ()\n at mapper (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:34:499)\n at promise.then (/Users/dev/Projects/GitHub/storybook/core/node_modules/jest-config/node_modules/jest-jasmine2/build/queue_runner.js:74:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)"],"fullName":"A bunch of failing tests: should work","status":"failed","title":"should work"}],"endTime":1510879395550,"message":"\u001b[1m\u001b[31m \u001b[1m● \u001b[1mIn a describe: › everything is awesome\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n \n Expected value to equal:\n \u001b[32m\"everything is awesome\"\u001b[39m\n Received:\n \u001b[31m\"everything is all right\"\u001b[39m\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/stories/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:15:39)\u001b[2m\u001b[22m\n\u001b[2m at new Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2m\u001b[0m\u001b[36minternal/process/next_tick.js\u001b[39m\u001b[0m\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › true should still be true\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toBe(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n \n Expected value to be (using ===):\n \u001b[32mfalse\u001b[39m\n Received:\n \u001b[31mtrue\u001b[39m\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/stories/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:21:18)\u001b[2m\u001b[22m\n\u001b[2m at new Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2m\u001b[0m\u001b[36minternal/process/next_tick.js\u001b[39m\u001b[0m\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › a list should contain 3 items\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31marray\u001b[39m\u001b[2m).toContain(\u001b[22m\u001b[32mvalue\u001b[39m\u001b[2m)\u001b[22m\n \n Expected array:\n \u001b[31m[\"a\", \"b\", \"3\"]\u001b[39m\n To contain value:\n \u001b[32m301\u001b[39m\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/stories/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:25:29)\u001b[2m\u001b[22m\n\u001b[2m at new Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2m\u001b[0m\u001b[36minternal/process/next_tick.js\u001b[39m\u001b[0m\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › should work\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mfunction\u001b[39m\u001b[2m).toThrow(\u001b[22m\u001b[32mundefined\u001b[39m\u001b[2m)\u001b[22m\n \n Expected the function to throw an error.\n But it didn't throw anything.\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/stories/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:29:28)\u001b[2m\u001b[22m\n\u001b[2m at new Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2m\u001b[0m\u001b[36minternal/process/next_tick.js\u001b[39m\u001b[0m\u001b[2m:188:7)\u001b[2m\u001b[22m\n","name":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.test.js","startTime":1510879395035,"status":"failed","summary":""}],"wasInterrupted":false,"coverageMap":{"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-jest.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"3":{"start":{"line":4,"column":17},"end":{"line":4,"column":49}},"4":{"start":{"line":5,"column":28},"end":{"line":5,"column":68}},"5":{"start":{"line":5,"column":98},"end":{"line":5,"column":143}},"6":{"start":{"line":5,"column":182},"end":{"line":5,"column":236}},"7":{"start":{"line":7,"column":21},"end":{"line":8,"column":44}},"8":{"start":{"line":11,"column":0},"end":{"line":15,"column":61}},"9":{"start":{"line":13,"column":30},"end":{"line":15,"column":58}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":5,"column":153},"end":{"line":5,"column":175}},"loc":{"start":{"line":5,"column":181},"end":{"line":5,"column":237}},"line":5},"1":{"name":"(anonymous_1)","decl":{"start":{"line":13,"column":17},"end":{"line":13,"column":18}},"loc":{"start":{"line":13,"column":29},"end":{"line":15,"column":59}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":189},"end":{"line":5,"column":235}},"type":"cond-expr","locations":[{"start":{"line":5,"column":213},"end":{"line":5,"column":216}},{"start":{"line":5,"column":219},"end":{"line":5,"column":235}}],"line":5},"1":{"loc":{"start":{"line":5,"column":189},"end":{"line":5,"column":210}},"type":"binary-expr","locations":[{"start":{"line":5,"column":189},"end":{"line":5,"column":192}},{"start":{"line":5,"column":196},"end":{"line":5,"column":210}}],"line":5}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/welcome.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/welcome.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":12},"end":{"line":2,"column":44}},"3":{"start":{"line":3,"column":14},"end":{"line":3,"column":41}},"4":{"start":{"line":4,"column":18},"end":{"line":4,"column":51}},"5":{"start":{"line":4,"column":90},"end":{"line":4,"column":144}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":178}},"7":{"start":{"line":6,"column":75},"end":{"line":6,"column":175}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":4,"column":61},"end":{"line":4,"column":83}},"loc":{"start":{"line":4,"column":89},"end":{"line":4,"column":145}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":62},"end":{"line":6,"column":63}},"loc":{"start":{"line":6,"column":74},"end":{"line":6,"column":176}},"line":6}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":97},"end":{"line":4,"column":143}},"type":"cond-expr","locations":[{"start":{"line":4,"column":121},"end":{"line":4,"column":124}},{"start":{"line":4,"column":127},"end":{"line":4,"column":143}}],"line":4},"1":{"loc":{"start":{"line":4,"column":97},"end":{"line":4,"column":118}},"type":"binary-expr","locations":[{"start":{"line":4,"column":97},"end":{"line":4,"column":100}},{"start":{"line":4,"column":104},"end":{"line":4,"column":118}}],"line":4}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/SimpleList.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/SimpleList.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":88},"end":{"line":1,"column":104}},"2":{"start":{"line":1,"column":119},"end":{"line":1,"column":149}},"3":{"start":{"line":2,"column":17},"end":{"line":2,"column":38}},"4":{"start":{"line":2,"column":57},"end":{"line":2,"column":91}},"5":{"start":{"line":2,"column":130},"end":{"line":2,"column":184}},"6":{"start":{"line":4,"column":11},"end":{"line":6,"column":103}},"7":{"start":{"line":4,"column":44},"end":{"line":4,"column":54}},"8":{"start":{"line":4,"column":55},"end":{"line":6,"column":102}},"9":{"start":{"line":6,"column":33},"end":{"line":6,"column":97}},"10":{"start":{"line":10,"column":0},"end":{"line":11,"column":78}},"11":{"start":{"line":11,"column":78},"end":{"line":14,"column":5}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":2,"column":101},"end":{"line":2,"column":123}},"loc":{"start":{"line":2,"column":129},"end":{"line":2,"column":185}},"line":2},"1":{"name":"List","decl":{"start":{"line":4,"column":20},"end":{"line":4,"column":24}},"loc":{"start":{"line":4,"column":31},"end":{"line":6,"column":103}},"line":4},"2":{"name":"(anonymous_2)","decl":{"start":{"line":6,"column":16},"end":{"line":6,"column":17}},"loc":{"start":{"line":6,"column":32},"end":{"line":6,"column":98}},"line":6}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":183}},"type":"cond-expr","locations":[{"start":{"line":2,"column":161},"end":{"line":2,"column":164}},{"start":{"line":2,"column":167},"end":{"line":2,"column":183}}],"line":2},"1":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":158}},"type":"binary-expr","locations":[{"start":{"line":2,"column":137},"end":{"line":2,"column":140}},{"start":{"line":2,"column":144},"end":{"line":2,"column":158}}],"line":2}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/BaseButton.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/BaseButton.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":88},"end":{"line":1,"column":104}},"2":{"start":{"line":1,"column":119},"end":{"line":1,"column":149}},"3":{"start":{"line":2,"column":17},"end":{"line":2,"column":38}},"4":{"start":{"line":2,"column":57},"end":{"line":2,"column":91}},"5":{"start":{"line":2,"column":130},"end":{"line":2,"column":184}},"6":{"start":{"line":5,"column":17},"end":{"line":7,"column":15}},"7":{"start":{"line":5,"column":59},"end":{"line":5,"column":72}},"8":{"start":{"line":5,"column":81},"end":{"line":5,"column":91}},"9":{"start":{"line":5,"column":102},"end":{"line":5,"column":114}},"10":{"start":{"line":5,"column":123},"end":{"line":5,"column":133}},"11":{"start":{"line":5,"column":134},"end":{"line":7,"column":14}},"12":{"start":{"line":11,"column":0},"end":{"line":14,"column":14}},"13":{"start":{"line":17,"column":0},"end":{"line":25,"column":41}},"14":{"start":{"line":25,"column":41},"end":{"line":28,"column":11}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":2,"column":101},"end":{"line":2,"column":123}},"loc":{"start":{"line":2,"column":129},"end":{"line":2,"column":185}},"line":2},"1":{"name":"BaseButton","decl":{"start":{"line":5,"column":26},"end":{"line":5,"column":36}},"loc":{"start":{"line":5,"column":43},"end":{"line":7,"column":15}},"line":5},"2":{"name":"onClick","decl":{"start":{"line":13,"column":20},"end":{"line":13,"column":27}},"loc":{"start":{"line":13,"column":30},"end":{"line":13,"column":32}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":183}},"type":"cond-expr","locations":[{"start":{"line":2,"column":161},"end":{"line":2,"column":164}},{"start":{"line":2,"column":167},"end":{"line":2,"column":183}}],"line":2},"1":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":158}},"type":"binary-expr","locations":[{"start":{"line":2,"column":137},"end":{"line":2,"column":140}},{"start":{"line":2,"column":144},"end":{"line":2,"column":158}}],"line":2}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/storybook-components.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/storybook-components.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":14},"end":{"line":2,"column":31}},"3":{"start":{"line":3,"column":17},"end":{"line":3,"column":37}},"4":{"start":{"line":5,"column":14},"end":{"line":5,"column":41}},"5":{"start":{"line":6,"column":20},"end":{"line":6,"column":55}},"6":{"start":{"line":7,"column":18},"end":{"line":7,"column":51}},"7":{"start":{"line":9,"column":18},"end":{"line":9,"column":50}},"8":{"start":{"line":9,"column":89},"end":{"line":9,"column":143}},"9":{"start":{"line":11,"column":0},"end":{"line":11,"column":50}},"10":{"start":{"line":13,"column":0},"end":{"line":23,"column":62}},"11":{"start":{"line":14,"column":32},"end":{"line":15,"column":218}},"12":{"start":{"line":20,"column":30},"end":{"line":23,"column":59}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":9,"column":60},"end":{"line":9,"column":82}},"loc":{"start":{"line":9,"column":88},"end":{"line":9,"column":144}},"line":9},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":19},"end":{"line":14,"column":20}},"loc":{"start":{"line":14,"column":31},"end":{"line":15,"column":219}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":17},"end":{"line":20,"column":18}},"loc":{"start":{"line":20,"column":29},"end":{"line":23,"column":60}},"line":20}},"branchMap":{"0":{"loc":{"start":{"line":9,"column":96},"end":{"line":9,"column":142}},"type":"cond-expr","locations":[{"start":{"line":9,"column":120},"end":{"line":9,"column":123}},{"start":{"line":9,"column":126},"end":{"line":9,"column":142}}],"line":9},"1":{"loc":{"start":{"line":9,"column":96},"end":{"line":9,"column":117}},"type":"binary-expr","locations":[{"start":{"line":9,"column":96},"end":{"line":9,"column":99}},{"start":{"line":9,"column":103},"end":{"line":9,"column":117}}],"line":9}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/FlowTypeButton.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/FlowTypeButton.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":2,"column":13},"end":{"line":2,"column":29}},"2":{"start":{"line":2,"column":44},"end":{"line":2,"column":74}},"3":{"start":{"line":2,"column":113},"end":{"line":2,"column":167}},"4":{"start":{"line":14,"column":21},"end":{"line":16,"column":15}},"5":{"start":{"line":14,"column":64},"end":{"line":14,"column":74}},"6":{"start":{"line":14,"column":85},"end":{"line":14,"column":97}},"7":{"start":{"line":14,"column":109},"end":{"line":14,"column":122}},"8":{"start":{"line":14,"column":123},"end":{"line":16,"column":14}},"9":{"start":{"line":20,"column":0},"end":{"line":22,"column":35}},"10":{"start":{"line":22,"column":35},"end":{"line":25,"column":15}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":2,"column":84},"end":{"line":2,"column":106}},"loc":{"start":{"line":2,"column":112},"end":{"line":2,"column":168}},"line":2},"1":{"name":"FlowTypeButton","decl":{"start":{"line":14,"column":30},"end":{"line":14,"column":44}},"loc":{"start":{"line":14,"column":51},"end":{"line":16,"column":15}},"line":14},"2":{"name":"onClick","decl":{"start":{"line":22,"column":20},"end":{"line":22,"column":27}},"loc":{"start":{"line":22,"column":30},"end":{"line":22,"column":32}},"line":22}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":120},"end":{"line":2,"column":166}},"type":"cond-expr","locations":[{"start":{"line":2,"column":144},"end":{"line":2,"column":147}},{"start":{"line":2,"column":150},"end":{"line":2,"column":166}}],"line":2},"1":{"loc":{"start":{"line":2,"column":120},"end":{"line":2,"column":141}},"type":"binary-expr","locations":[{"start":{"line":2,"column":120},"end":{"line":2,"column":123}},{"start":{"line":2,"column":127},"end":{"line":2,"column":141}}],"line":2}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/Container.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/Container.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":88},"end":{"line":1,"column":104}},"2":{"start":{"line":1,"column":119},"end":{"line":1,"column":149}},"3":{"start":{"line":2,"column":17},"end":{"line":2,"column":38}},"4":{"start":{"line":2,"column":57},"end":{"line":2,"column":91}},"5":{"start":{"line":2,"column":130},"end":{"line":2,"column":184}},"6":{"start":{"line":4,"column":16},"end":{"line":8,"column":80}},"7":{"start":{"line":4,"column":57},"end":{"line":4,"column":70}},"8":{"start":{"line":4,"column":79},"end":{"line":4,"column":89}},"9":{"start":{"line":4,"column":96},"end":{"line":4,"column":104}},"10":{"start":{"line":4,"column":117},"end":{"line":4,"column":131}},"11":{"start":{"line":4,"column":132},"end":{"line":8,"column":79}},"12":{"start":{"line":12,"column":0},"end":{"line":16,"column":38}},"13":{"start":{"line":18,"column":0},"end":{"line":21,"column":37}},"14":{"start":{"line":21,"column":37},"end":{"line":24,"column":10}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":2,"column":101},"end":{"line":2,"column":123}},"loc":{"start":{"line":2,"column":129},"end":{"line":2,"column":185}},"line":2},"1":{"name":"Container","decl":{"start":{"line":4,"column":25},"end":{"line":4,"column":34}},"loc":{"start":{"line":4,"column":41},"end":{"line":8,"column":80}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":183}},"type":"cond-expr","locations":[{"start":{"line":2,"column":161},"end":{"line":2,"column":164}},{"start":{"line":2,"column":167},"end":{"line":2,"column":183}}],"line":2},"1":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":158}},"type":"binary-expr","locations":[{"start":{"line":2,"column":137},"end":{"line":2,"column":140}},{"start":{"line":2,"column":144},"end":{"line":2,"column":158}}],"line":2},"2":{"loc":{"start":{"line":7,"column":6},"end":{"line":7,"column":28}},"type":"cond-expr","locations":[{"start":{"line":7,"column":18},"end":{"line":7,"column":23}},{"start":{"line":7,"column":26},"end":{"line":7,"column":28}}],"line":7},"3":{"loc":{"start":{"line":8,"column":6},"end":{"line":8,"column":76}},"type":"cond-expr","locations":[{"start":{"line":8,"column":12},"end":{"line":8,"column":69}},{"start":{"line":8,"column":72},"end":{"line":8,"column":76}}],"line":8}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/DocgenButton.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/components/DocgenButton.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":88},"end":{"line":1,"column":104}},"2":{"start":{"line":1,"column":119},"end":{"line":1,"column":149}},"3":{"start":{"line":2,"column":17},"end":{"line":2,"column":38}},"4":{"start":{"line":2,"column":57},"end":{"line":2,"column":91}},"5":{"start":{"line":2,"column":130},"end":{"line":2,"column":184}},"6":{"start":{"line":5,"column":19},"end":{"line":7,"column":15}},"7":{"start":{"line":5,"column":63},"end":{"line":5,"column":76}},"8":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"9":{"start":{"line":5,"column":106},"end":{"line":5,"column":118}},"10":{"start":{"line":5,"column":119},"end":{"line":7,"column":14}},"11":{"start":{"line":11,"column":0},"end":{"line":13,"column":35}},"12":{"start":{"line":18,"column":14},"end":{"line":18,"column":16}},"13":{"start":{"line":20,"column":0},"end":{"line":69,"column":112}},"14":{"start":{"line":69,"column":112},"end":{"line":72,"column":13}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":2,"column":101},"end":{"line":2,"column":123}},"loc":{"start":{"line":2,"column":129},"end":{"line":2,"column":185}},"line":2},"1":{"name":"DocgenButton","decl":{"start":{"line":5,"column":28},"end":{"line":5,"column":40}},"loc":{"start":{"line":5,"column":47},"end":{"line":7,"column":15}},"line":5},"2":{"name":"onClick","decl":{"start":{"line":13,"column":20},"end":{"line":13,"column":27}},"loc":{"start":{"line":13,"column":30},"end":{"line":13,"column":32}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":183}},"type":"cond-expr","locations":[{"start":{"line":2,"column":161},"end":{"line":2,"column":164}},{"start":{"line":2,"column":167},"end":{"line":2,"column":183}}],"line":2},"1":{"loc":{"start":{"line":2,"column":137},"end":{"line":2,"column":158}},"type":"binary-expr","locations":[{"start":{"line":2,"column":137},"end":{"line":2,"column":140}},{"start":{"line":2,"column":144},"end":{"line":2,"column":158}}],"line":2}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-notes.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-notes.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"3":{"start":{"line":4,"column":18},"end":{"line":4,"column":51}},"4":{"start":{"line":5,"column":20},"end":{"line":5,"column":55}},"5":{"start":{"line":6,"column":18},"end":{"line":6,"column":53}},"6":{"start":{"line":6,"column":73},"end":{"line":6,"column":108}},"7":{"start":{"line":6,"column":147},"end":{"line":6,"column":201}},"8":{"start":{"line":8,"column":0},"end":{"line":17,"column":176}},"9":{"start":{"line":13,"column":13},"end":{"line":13,"column":140}},"10":{"start":{"line":15,"column":41},"end":{"line":17,"column":173}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":6,"column":118},"end":{"line":6,"column":140}},"loc":{"start":{"line":6,"column":146},"end":{"line":6,"column":202}},"line":6},"1":{"name":"(anonymous_1)","decl":{"start":{"line":13,"column":0},"end":{"line":13,"column":1}},"loc":{"start":{"line":13,"column":12},"end":{"line":13,"column":141}},"line":13},"2":{"name":"(anonymous_2)","decl":{"start":{"line":15,"column":28},"end":{"line":15,"column":29}},"loc":{"start":{"line":15,"column":40},"end":{"line":17,"column":174}},"line":15}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":154},"end":{"line":6,"column":200}},"type":"cond-expr","locations":[{"start":{"line":6,"column":178},"end":{"line":6,"column":181}},{"start":{"line":6,"column":184},"end":{"line":6,"column":200}}],"line":6},"1":{"loc":{"start":{"line":6,"column":154},"end":{"line":6,"column":175}},"type":"binary-expr","locations":[{"start":{"line":6,"column":154},"end":{"line":6,"column":157}},{"start":{"line":6,"column":161},"end":{"line":6,"column":175}}],"line":6}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-backgrounds.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-backgrounds.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"3":{"start":{"line":4,"column":24},"end":{"line":4,"column":63}},"4":{"start":{"line":4,"column":89},"end":{"line":4,"column":130}},"5":{"start":{"line":5,"column":18},"end":{"line":5,"column":53}},"6":{"start":{"line":5,"column":73},"end":{"line":5,"column":108}},"7":{"start":{"line":5,"column":147},"end":{"line":5,"column":201}},"8":{"start":{"line":7,"column":0},"end":{"line":17,"column":118}},"9":{"start":{"line":14,"column":28},"end":{"line":15,"column":127}},"10":{"start":{"line":17,"column":28},"end":{"line":17,"column":115}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":5,"column":118},"end":{"line":5,"column":140}},"loc":{"start":{"line":5,"column":146},"end":{"line":5,"column":202}},"line":5},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":15},"end":{"line":14,"column":16}},"loc":{"start":{"line":14,"column":27},"end":{"line":15,"column":128}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":17,"column":15},"end":{"line":17,"column":16}},"loc":{"start":{"line":17,"column":27},"end":{"line":17,"column":116}},"line":17}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":154},"end":{"line":5,"column":200}},"type":"cond-expr","locations":[{"start":{"line":5,"column":178},"end":{"line":5,"column":181}},{"start":{"line":5,"column":184},"end":{"line":5,"column":200}}],"line":5},"1":{"loc":{"start":{"line":5,"column":154},"end":{"line":5,"column":175}},"type":"binary-expr","locations":[{"start":{"line":5,"column":154},"end":{"line":5,"column":157}},{"start":{"line":5,"column":161},"end":{"line":5,"column":175}}],"line":5}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/App.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/App.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":88},"end":{"line":1,"column":104}},"2":{"start":{"line":1,"column":119},"end":{"line":1,"column":149}},"3":{"start":{"line":2,"column":12},"end":{"line":2,"column":33}},"4":{"start":{"line":2,"column":47},"end":{"line":2,"column":76}},"5":{"start":{"line":3,"column":0},"end":{"line":3,"column":21}},"6":{"start":{"line":3,"column":59},"end":{"line":3,"column":113}},"7":{"start":{"line":5,"column":10},"end":{"line":12,"column":94}},"8":{"start":{"line":5,"column":26},"end":{"line":12,"column":93}},"9":{"start":{"line":12,"column":95},"end":{"line":17,"column":4}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":3,"column":30},"end":{"line":3,"column":52}},"loc":{"start":{"line":3,"column":58},"end":{"line":3,"column":114}},"line":3},"1":{"name":"App","decl":{"start":{"line":5,"column":19},"end":{"line":5,"column":22}},"loc":{"start":{"line":5,"column":25},"end":{"line":12,"column":94}},"line":5}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":66},"end":{"line":3,"column":112}},"type":"cond-expr","locations":[{"start":{"line":3,"column":90},"end":{"line":3,"column":93}},{"start":{"line":3,"column":96},"end":{"line":3,"column":112}}],"line":3},"1":{"loc":{"start":{"line":3,"column":66},"end":{"line":3,"column":87}},"type":"binary-expr","locations":[{"start":{"line":3,"column":66},"end":{"line":3,"column":69}},{"start":{"line":3,"column":73},"end":{"line":3,"column":87}}],"line":3}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-a11y.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-a11y.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"3":{"start":{"line":4,"column":17},"end":{"line":4,"column":49}},"4":{"start":{"line":5,"column":18},"end":{"line":5,"column":53}},"5":{"start":{"line":5,"column":73},"end":{"line":5,"column":108}},"6":{"start":{"line":5,"column":147},"end":{"line":5,"column":201}},"7":{"start":{"line":7,"column":11},"end":{"line":7,"column":35}},"8":{"start":{"line":9,"column":0},"end":{"line":16,"column":130}},"9":{"start":{"line":11,"column":28},"end":{"line":11,"column":102}},"10":{"start":{"line":12,"column":26},"end":{"line":12,"column":102}},"11":{"start":{"line":13,"column":29},"end":{"line":13,"column":121}},"12":{"start":{"line":14,"column":37},"end":{"line":16,"column":127}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":5,"column":118},"end":{"line":5,"column":140}},"loc":{"start":{"line":5,"column":146},"end":{"line":5,"column":202}},"line":5},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":15},"end":{"line":11,"column":16}},"loc":{"start":{"line":11,"column":27},"end":{"line":11,"column":103}},"line":11},"2":{"name":"(anonymous_2)","decl":{"start":{"line":12,"column":13},"end":{"line":12,"column":14}},"loc":{"start":{"line":12,"column":25},"end":{"line":12,"column":103}},"line":12},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":16},"end":{"line":13,"column":17}},"loc":{"start":{"line":13,"column":28},"end":{"line":13,"column":122}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":14,"column":24},"end":{"line":14,"column":25}},"loc":{"start":{"line":14,"column":36},"end":{"line":16,"column":128}},"line":14}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":154},"end":{"line":5,"column":200}},"type":"cond-expr","locations":[{"start":{"line":5,"column":178},"end":{"line":5,"column":181}},{"start":{"line":5,"column":184},"end":{"line":5,"column":200}}],"line":5},"1":{"loc":{"start":{"line":5,"column":154},"end":{"line":5,"column":175}},"type":"binary-expr","locations":[{"start":{"line":5,"column":154},"end":{"line":5,"column":157}},{"start":{"line":5,"column":161},"end":{"line":5,"column":175}}],"line":5}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/index.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/index.stories.js","statementMap":{"0":{"start":{"line":1,"column":26},"end":{"line":1,"column":42}},"1":{"start":{"line":1,"column":57},"end":{"line":1,"column":87}},"2":{"start":{"line":2,"column":20},"end":{"line":2,"column":44}},"3":{"start":{"line":2,"column":66},"end":{"line":2,"column":103}},"4":{"start":{"line":4,"column":14},"end":{"line":4,"column":41}},"5":{"start":{"line":5,"column":20},"end":{"line":5,"column":55}},"6":{"start":{"line":6,"column":20},"end":{"line":6,"column":55}},"7":{"start":{"line":7,"column":18},"end":{"line":7,"column":51}},"8":{"start":{"line":8,"column":19},"end":{"line":8,"column":53}},"9":{"start":{"line":8,"column":74},"end":{"line":8,"column":110}},"10":{"start":{"line":9,"column":21},"end":{"line":9,"column":57}},"11":{"start":{"line":9,"column":80},"end":{"line":9,"column":118}},"12":{"start":{"line":10,"column":17},"end":{"line":10,"column":49}},"13":{"start":{"line":11,"column":12},"end":{"line":11,"column":44}},"14":{"start":{"line":13,"column":11},"end":{"line":13,"column":28}},"15":{"start":{"line":13,"column":41},"end":{"line":13,"column":69}},"16":{"start":{"line":14,"column":14},"end":{"line":14,"column":33}},"17":{"start":{"line":14,"column":49},"end":{"line":14,"column":80}},"18":{"start":{"line":15,"column":17},"end":{"line":15,"column":39}},"19":{"start":{"line":15,"column":58},"end":{"line":15,"column":92}},"20":{"start":{"line":15,"column":131},"end":{"line":15,"column":185}},"21":{"start":{"line":17,"column":13},"end":{"line":21,"column":32}},"22":{"start":{"line":24,"column":13},"end":{"line":24,"column":41}},"23":{"start":{"line":25,"column":11},"end":{"line":25,"column":35}},"24":{"start":{"line":27,"column":17},"end":{"line":41,"column":13}},"25":{"start":{"line":27,"column":40},"end":{"line":41,"column":12}},"26":{"start":{"line":45,"column":0},"end":{"line":99,"column":121}},"27":{"start":{"line":46,"column":30},"end":{"line":48,"column":113}},"28":{"start":{"line":52,"column":36},"end":{"line":54,"column":152}},"29":{"start":{"line":58,"column":27},"end":{"line":60,"column":107}},"30":{"start":{"line":64,"column":31},"end":{"line":68,"column":127}},"31":{"start":{"line":76,"column":20},"end":{"line":78,"column":116}},"32":{"start":{"line":86,"column":20},"end":{"line":89,"column":116}},"33":{"start":{"line":96,"column":77},"end":{"line":99,"column":116}},"34":{"start":{"line":105,"column":0},"end":{"line":105,"column":128}},"35":{"start":{"line":105,"column":67},"end":{"line":105,"column":125}},"36":{"start":{"line":107,"column":0},"end":{"line":109,"column":151}},"37":{"start":{"line":109,"column":30},"end":{"line":109,"column":148}},"38":{"start":{"line":111,"column":0},"end":{"line":166,"column":105}},"39":{"start":{"line":112,"column":34},"end":{"line":163,"column":19}},"40":{"start":{"line":166,"column":27},"end":{"line":166,"column":102}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":15,"column":102},"end":{"line":15,"column":124}},"loc":{"start":{"line":15,"column":130},"end":{"line":15,"column":186}},"line":15},"1":{"name":"InfoButton","decl":{"start":{"line":27,"column":26},"end":{"line":27,"column":36}},"loc":{"start":{"line":27,"column":39},"end":{"line":41,"column":13}},"line":27},"2":{"name":"(anonymous_2)","decl":{"start":{"line":46,"column":17},"end":{"line":46,"column":18}},"loc":{"start":{"line":46,"column":29},"end":{"line":48,"column":114}},"line":46},"3":{"name":"(anonymous_3)","decl":{"start":{"line":52,"column":23},"end":{"line":52,"column":24}},"loc":{"start":{"line":52,"column":35},"end":{"line":54,"column":153}},"line":52},"4":{"name":"(anonymous_4)","decl":{"start":{"line":58,"column":14},"end":{"line":58,"column":15}},"loc":{"start":{"line":58,"column":26},"end":{"line":60,"column":108}},"line":58},"5":{"name":"(anonymous_5)","decl":{"start":{"line":64,"column":18},"end":{"line":64,"column":19}},"loc":{"start":{"line":64,"column":30},"end":{"line":68,"column":128}},"line":64},"6":{"name":"(anonymous_6)","decl":{"start":{"line":76,"column":0},"end":{"line":76,"column":1}},"loc":{"start":{"line":76,"column":19},"end":{"line":78,"column":117}},"line":76},"7":{"name":"(anonymous_7)","decl":{"start":{"line":86,"column":0},"end":{"line":86,"column":1}},"loc":{"start":{"line":86,"column":19},"end":{"line":89,"column":117}},"line":86},"8":{"name":"(anonymous_8)","decl":{"start":{"line":96,"column":57},"end":{"line":96,"column":58}},"loc":{"start":{"line":96,"column":76},"end":{"line":99,"column":117}},"line":96},"9":{"name":"(anonymous_9)","decl":{"start":{"line":105,"column":54},"end":{"line":105,"column":55}},"loc":{"start":{"line":105,"column":66},"end":{"line":105,"column":126}},"line":105},"10":{"name":"(anonymous_10)","decl":{"start":{"line":109,"column":17},"end":{"line":109,"column":18}},"loc":{"start":{"line":109,"column":29},"end":{"line":109,"column":149}},"line":109},"11":{"name":"(anonymous_11)","decl":{"start":{"line":112,"column":13},"end":{"line":112,"column":14}},"loc":{"start":{"line":112,"column":33},"end":{"line":163,"column":20}},"line":112},"12":{"name":"(anonymous_12)","decl":{"start":{"line":166,"column":14},"end":{"line":166,"column":15}},"loc":{"start":{"line":166,"column":26},"end":{"line":166,"column":103}},"line":166}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":138},"end":{"line":15,"column":184}},"type":"cond-expr","locations":[{"start":{"line":15,"column":162},"end":{"line":15,"column":165}},{"start":{"line":15,"column":168},"end":{"line":15,"column":184}}],"line":15},"1":{"loc":{"start":{"line":15,"column":138},"end":{"line":15,"column":159}},"type":"binary-expr","locations":[{"start":{"line":15,"column":138},"end":{"line":15,"column":141}},{"start":{"line":15,"column":145},"end":{"line":15,"column":159}}],"line":15}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-info.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-info.stories.js","statementMap":{"0":{"start":{"line":1,"column":45},"end":{"line":1,"column":101}},"1":{"start":{"line":1,"column":134},"end":{"line":1,"column":183}},"2":{"start":{"line":1,"column":197},"end":{"line":1,"column":213}},"3":{"start":{"line":1,"column":228},"end":{"line":1,"column":258}},"4":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"5":{"start":{"line":3,"column":17},"end":{"line":3,"column":49}},"6":{"start":{"line":4,"column":20},"end":{"line":4,"column":55}},"7":{"start":{"line":6,"column":20},"end":{"line":6,"column":57}},"8":{"start":{"line":6,"column":79},"end":{"line":6,"column":116}},"9":{"start":{"line":7,"column":22},"end":{"line":7,"column":61}},"10":{"start":{"line":7,"column":85},"end":{"line":7,"column":124}},"11":{"start":{"line":8,"column":18},"end":{"line":8,"column":53}},"12":{"start":{"line":8,"column":73},"end":{"line":8,"column":108}},"13":{"start":{"line":8,"column":147},"end":{"line":8,"column":201}},"14":{"start":{"line":10,"column":0},"end":{"line":27,"column":144}},"15":{"start":{"line":15,"column":13},"end":{"line":15,"column":149}},"16":{"start":{"line":21,"column":13},"end":{"line":21,"column":155}},"17":{"start":{"line":27,"column":13},"end":{"line":27,"column":140}},"18":{"start":{"line":30,"column":26},"end":{"line":30,"column":268}},"19":{"start":{"line":41,"column":0},"end":{"line":43,"column":190}},"20":{"start":{"line":43,"column":59},"end":{"line":43,"column":186}},"21":{"start":{"line":46,"column":0},"end":{"line":51,"column":100}},"22":{"start":{"line":51,"column":16},"end":{"line":51,"column":96}},"23":{"start":{"line":54,"column":0},"end":{"line":59,"column":100}},"24":{"start":{"line":59,"column":16},"end":{"line":59,"column":96}},"25":{"start":{"line":62,"column":0},"end":{"line":67,"column":100}},"26":{"start":{"line":67,"column":16},"end":{"line":67,"column":96}},"27":{"start":{"line":70,"column":0},"end":{"line":75,"column":97}},"28":{"start":{"line":75,"column":13},"end":{"line":75,"column":93}},"29":{"start":{"line":78,"column":0},"end":{"line":86,"column":100}},"30":{"start":{"line":83,"column":13},"end":{"line":86,"column":96}},"31":{"start":{"line":91,"column":0},"end":{"line":95,"column":97}},"32":{"start":{"line":95,"column":13},"end":{"line":95,"column":93}},"33":{"start":{"line":98,"column":0},"end":{"line":102,"column":131}},"34":{"start":{"line":99,"column":40},"end":{"line":100,"column":108}},"35":{"start":{"line":102,"column":48},"end":{"line":102,"column":128}},"36":{"start":{"line":104,"column":10},"end":{"line":104,"column":186}},"37":{"start":{"line":104,"column":39},"end":{"line":104,"column":185}},"38":{"start":{"line":104,"column":75},"end":{"line":104,"column":123}},"39":{"start":{"line":104,"column":124},"end":{"line":104,"column":183}},"40":{"start":{"line":106,"column":12},"end":{"line":106,"column":95}},"41":{"start":{"line":106,"column":29},"end":{"line":106,"column":93}},"42":{"start":{"line":108,"column":15},"end":{"line":108,"column":134}},"43":{"start":{"line":108,"column":52},"end":{"line":108,"column":66}},"44":{"start":{"line":108,"column":67},"end":{"line":108,"column":132}},"45":{"start":{"line":110,"column":0},"end":{"line":115,"column":58}},"46":{"start":{"line":112,"column":84},"end":{"line":115,"column":54}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":8,"column":118},"end":{"line":8,"column":140}},"loc":{"start":{"line":8,"column":146},"end":{"line":8,"column":202}},"line":8},"1":{"name":"(anonymous_1)","decl":{"start":{"line":15,"column":0},"end":{"line":15,"column":1}},"loc":{"start":{"line":15,"column":12},"end":{"line":15,"column":150}},"line":15},"2":{"name":"(anonymous_2)","decl":{"start":{"line":21,"column":0},"end":{"line":21,"column":1}},"loc":{"start":{"line":21,"column":12},"end":{"line":21,"column":156}},"line":21},"3":{"name":"(anonymous_3)","decl":{"start":{"line":27,"column":0},"end":{"line":27,"column":1}},"loc":{"start":{"line":27,"column":12},"end":{"line":27,"column":141}},"line":27},"4":{"name":"(anonymous_4)","decl":{"start":{"line":43,"column":46},"end":{"line":43,"column":47}},"loc":{"start":{"line":43,"column":58},"end":{"line":43,"column":187}},"line":43},"5":{"name":"(anonymous_5)","decl":{"start":{"line":51,"column":3},"end":{"line":51,"column":4}},"loc":{"start":{"line":51,"column":15},"end":{"line":51,"column":97}},"line":51},"6":{"name":"(anonymous_6)","decl":{"start":{"line":59,"column":3},"end":{"line":59,"column":4}},"loc":{"start":{"line":59,"column":15},"end":{"line":59,"column":97}},"line":59},"7":{"name":"(anonymous_7)","decl":{"start":{"line":67,"column":3},"end":{"line":67,"column":4}},"loc":{"start":{"line":67,"column":15},"end":{"line":67,"column":97}},"line":67},"8":{"name":"(anonymous_8)","decl":{"start":{"line":75,"column":0},"end":{"line":75,"column":1}},"loc":{"start":{"line":75,"column":12},"end":{"line":75,"column":94}},"line":75},"9":{"name":"(anonymous_9)","decl":{"start":{"line":83,"column":0},"end":{"line":83,"column":1}},"loc":{"start":{"line":83,"column":12},"end":{"line":86,"column":97}},"line":83},"10":{"name":"(anonymous_10)","decl":{"start":{"line":95,"column":0},"end":{"line":95,"column":1}},"loc":{"start":{"line":95,"column":12},"end":{"line":95,"column":94}},"line":95},"11":{"name":"(anonymous_11)","decl":{"start":{"line":99,"column":13},"end":{"line":99,"column":14}},"loc":{"start":{"line":99,"column":39},"end":{"line":100,"column":109}},"line":99},"12":{"name":"(anonymous_12)","decl":{"start":{"line":102,"column":35},"end":{"line":102,"column":36}},"loc":{"start":{"line":102,"column":47},"end":{"line":102,"column":129}},"line":102},"13":{"name":"hoc","decl":{"start":{"line":104,"column":19},"end":{"line":104,"column":22}},"loc":{"start":{"line":104,"column":38},"end":{"line":104,"column":186}},"line":104},"14":{"name":"(anonymous_14)","decl":{"start":{"line":104,"column":46},"end":{"line":104,"column":47}},"loc":{"start":{"line":104,"column":62},"end":{"line":104,"column":184}},"line":104},"15":{"name":"(anonymous_15)","decl":{"start":{"line":106,"column":16},"end":{"line":106,"column":17}},"loc":{"start":{"line":106,"column":28},"end":{"line":106,"column":94}},"line":106},"16":{"name":"(anonymous_16)","decl":{"start":{"line":108,"column":19},"end":{"line":108,"column":20}},"loc":{"start":{"line":108,"column":36},"end":{"line":108,"column":133}},"line":108},"17":{"name":"(anonymous_17)","decl":{"start":{"line":112,"column":71},"end":{"line":112,"column":72}},"loc":{"start":{"line":112,"column":83},"end":{"line":115,"column":55}},"line":112}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":154},"end":{"line":8,"column":200}},"type":"cond-expr","locations":[{"start":{"line":8,"column":178},"end":{"line":8,"column":181}},{"start":{"line":8,"column":184},"end":{"line":8,"column":200}}],"line":8},"1":{"loc":{"start":{"line":8,"column":154},"end":{"line":8,"column":175}},"type":"binary-expr","locations":[{"start":{"line":8,"column":154},"end":{"line":8,"column":157}},{"start":{"line":8,"column":161},"end":{"line":8,"column":175}}],"line":8}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0},"b":{"0":[0,0],"1":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/Logger.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/Logger.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":101},"end":{"line":1,"column":151}},"2":{"start":{"line":1,"column":178},"end":{"line":1,"column":221}},"3":{"start":{"line":1,"column":245},"end":{"line":1,"column":292}},"4":{"start":{"line":1,"column":316},"end":{"line":1,"column":356}},"5":{"start":{"line":1,"column":377},"end":{"line":1,"column":421}},"6":{"start":{"line":1,"column":442},"end":{"line":1,"column":479}},"7":{"start":{"line":1,"column":514},"end":{"line":1,"column":572}},"8":{"start":{"line":1,"column":607},"end":{"line":1,"column":658}},"9":{"start":{"line":1,"column":676},"end":{"line":1,"column":717}},"10":{"start":{"line":1,"column":735},"end":{"line":1,"column":769}},"11":{"start":{"line":1,"column":783},"end":{"line":1,"column":799}},"12":{"start":{"line":1,"column":814},"end":{"line":1,"column":844}},"13":{"start":{"line":2,"column":18},"end":{"line":2,"column":40}},"14":{"start":{"line":2,"column":60},"end":{"line":2,"column":95}},"15":{"start":{"line":3,"column":17},"end":{"line":3,"column":38}},"16":{"start":{"line":3,"column":57},"end":{"line":3,"column":91}},"17":{"start":{"line":4,"column":20},"end":{"line":4,"column":44}},"18":{"start":{"line":4,"column":66},"end":{"line":4,"column":103}},"19":{"start":{"line":6,"column":9},"end":{"line":6,"column":27}},"20":{"start":{"line":6,"column":38},"end":{"line":6,"column":64}},"21":{"start":{"line":6,"column":103},"end":{"line":6,"column":157}},"22":{"start":{"line":8,"column":13},"end":{"line":12,"column":32}},"23":{"start":{"line":15,"column":13},"end":{"line":26,"column":24}},"24":{"start":{"line":30,"column":9},"end":{"line":74,"column":43}},"25":{"start":{"line":30,"column":32},"end":{"line":30,"column":76}},"26":{"start":{"line":30,"column":127},"end":{"line":30,"column":171}},"27":{"start":{"line":30,"column":171},"end":{"line":30,"column":287}},"28":{"start":{"line":30,"column":257},"end":{"line":30,"column":286}},"29":{"start":{"line":30,"column":287},"end":{"line":52,"column":73}},"30":{"start":{"line":48,"column":38},"end":{"line":52,"column":8}},"31":{"start":{"line":49,"column":8},"end":{"line":50,"column":137}},"32":{"start":{"line":49,"column":54},"end":{"line":49,"column":66}},"33":{"start":{"line":49,"column":67},"end":{"line":50,"column":134}},"34":{"start":{"line":52,"column":74},"end":{"line":74,"column":10}},"35":{"start":{"line":52,"column":190},"end":{"line":52,"column":207}},"36":{"start":{"line":52,"column":208},"end":{"line":52,"column":281}},"37":{"start":{"line":52,"column":281},"end":{"line":52,"column":354}},"38":{"start":{"line":52,"column":354},"end":{"line":52,"column":427}},"39":{"start":{"line":52,"column":427},"end":{"line":52,"column":500}},"40":{"start":{"line":55,"column":15},"end":{"line":55,"column":32}},"41":{"start":{"line":57,"column":6},"end":{"line":67,"column":130}},"42":{"start":{"line":61,"column":50},"end":{"line":61,"column":58}},"43":{"start":{"line":61,"column":66},"end":{"line":61,"column":76}},"44":{"start":{"line":61,"column":87},"end":{"line":61,"column":100}},"45":{"start":{"line":61,"column":101},"end":{"line":67,"column":124}},"46":{"start":{"line":74,"column":10},"end":{"line":74,"column":24}},"47":{"start":{"line":74,"column":44},"end":{"line":74,"column":141}},"48":{"start":{"line":74,"column":141},"end":{"line":74,"column":166}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":6,"column":74},"end":{"line":6,"column":96}},"loc":{"start":{"line":6,"column":102},"end":{"line":6,"column":158}},"line":6},"1":{"name":"(anonymous_1)","decl":{"start":{"line":30,"column":9},"end":{"line":30,"column":10}},"loc":{"start":{"line":30,"column":31},"end":{"line":74,"column":25}},"line":30},"2":{"name":"Logger","decl":{"start":{"line":30,"column":85},"end":{"line":30,"column":91}},"loc":{"start":{"line":30,"column":94},"end":{"line":52,"column":74}},"line":30},"3":{"name":"(anonymous_3)","decl":{"start":{"line":48,"column":21},"end":{"line":48,"column":22}},"loc":{"start":{"line":48,"column":37},"end":{"line":52,"column":9}},"line":48},"4":{"name":"(anonymous_4)","decl":{"start":{"line":48,"column":45},"end":{"line":48,"column":46}},"loc":{"start":{"line":48,"column":64},"end":{"line":52,"column":7}},"line":48},"5":{"name":"(anonymous_5)","decl":{"start":{"line":49,"column":23},"end":{"line":49,"column":24}},"loc":{"start":{"line":49,"column":40},"end":{"line":50,"column":135}},"line":49},"6":{"name":"componentWillMount","decl":{"start":{"line":52,"column":155},"end":{"line":52,"column":173}},"loc":{"start":{"line":52,"column":176},"end":{"line":52,"column":501}},"line":52},"7":{"name":"render","decl":{"start":{"line":52,"column":538},"end":{"line":52,"column":544}},"loc":{"start":{"line":54,"column":4},"end":{"line":74,"column":5}},"line":54},"8":{"name":"(anonymous_8)","decl":{"start":{"line":61,"column":23},"end":{"line":61,"column":24}},"loc":{"start":{"line":61,"column":40},"end":{"line":67,"column":125}},"line":61}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":110},"end":{"line":6,"column":156}},"type":"cond-expr","locations":[{"start":{"line":6,"column":134},"end":{"line":6,"column":137}},{"start":{"line":6,"column":140},"end":{"line":6,"column":156}}],"line":6},"1":{"loc":{"start":{"line":6,"column":110},"end":{"line":6,"column":131}},"type":"binary-expr","locations":[{"start":{"line":6,"column":110},"end":{"line":6,"column":113}},{"start":{"line":6,"column":117},"end":{"line":6,"column":131}}],"line":6},"2":{"loc":{"start":{"line":30,"column":374},"end":{"line":30,"column":423}},"type":"binary-expr","locations":[{"start":{"line":30,"column":374},"end":{"line":30,"column":390}},{"start":{"line":30,"column":394},"end":{"line":30,"column":423}}],"line":30}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0]}},"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-knobs.stories.js":{"path":"/Users/dev/Projects/GitHub/storybook/core/examples/cra-kitchen-sink/src/stories/addon-knobs.stories.js","statementMap":{"0":{"start":{"line":1,"column":29},"end":{"line":1,"column":69}},"1":{"start":{"line":1,"column":86},"end":{"line":1,"column":119}},"2":{"start":{"line":1,"column":143},"end":{"line":1,"column":190}},"3":{"start":{"line":1,"column":214},"end":{"line":1,"column":254}},"4":{"start":{"line":1,"column":275},"end":{"line":1,"column":319}},"5":{"start":{"line":1,"column":340},"end":{"line":1,"column":377}},"6":{"start":{"line":1,"column":412},"end":{"line":1,"column":470}},"7":{"start":{"line":1,"column":505},"end":{"line":1,"column":556}},"8":{"start":{"line":1,"column":574},"end":{"line":1,"column":615}},"9":{"start":{"line":1,"column":633},"end":{"line":1,"column":667}},"10":{"start":{"line":1,"column":681},"end":{"line":1,"column":697}},"11":{"start":{"line":1,"column":712},"end":{"line":1,"column":742}},"12":{"start":{"line":2,"column":14},"end":{"line":2,"column":41}},"13":{"start":{"line":4,"column":18},"end":{"line":4,"column":51}},"14":{"start":{"line":4,"column":90},"end":{"line":4,"column":144}},"15":{"start":{"line":18,"column":18},"end":{"line":45,"column":61}},"16":{"start":{"line":18,"column":47},"end":{"line":18,"column":106}},"17":{"start":{"line":19,"column":30},"end":{"line":19,"column":83}},"18":{"start":{"line":19,"column":95},"end":{"line":19,"column":223}},"19":{"start":{"line":21,"column":4},"end":{"line":21,"column":32}},"20":{"start":{"line":21,"column":32},"end":{"line":21,"column":45}},"21":{"start":{"line":22,"column":3},"end":{"line":45,"column":10}},"22":{"start":{"line":24,"column":18},"end":{"line":24,"column":22}},"23":{"start":{"line":25,"column":6},"end":{"line":27,"column":21}},"24":{"start":{"line":29,"column":6},"end":{"line":29,"column":120}},"25":{"start":{"line":29,"column":30},"end":{"line":29,"column":111}},"26":{"start":{"line":32,"column":18},"end":{"line":32,"column":22}},"27":{"start":{"line":35,"column":6},"end":{"line":35,"column":96}},"28":{"start":{"line":35,"column":61},"end":{"line":35,"column":93}},"29":{"start":{"line":37,"column":6},"end":{"line":37,"column":16}},"30":{"start":{"line":37,"column":29},"end":{"line":37,"column":45}},"31":{"start":{"line":37,"column":54},"end":{"line":37,"column":66}},"32":{"start":{"line":39,"column":6},"end":{"line":43,"column":7}},"33":{"start":{"line":40,"column":8},"end":{"line":40,"column":72}},"34":{"start":{"line":41,"column":13},"end":{"line":43,"column":7}},"35":{"start":{"line":42,"column":8},"end":{"line":42,"column":75}},"36":{"start":{"line":44,"column":6},"end":{"line":44,"column":141}},"37":{"start":{"line":44,"column":79},"end":{"line":44,"column":137}},"38":{"start":{"line":45,"column":10},"end":{"line":45,"column":33}},"39":{"start":{"line":48,"column":0},"end":{"line":94,"column":64}},"40":{"start":{"line":51,"column":13},"end":{"line":51,"column":57}},"41":{"start":{"line":52,"column":12},"end":{"line":52,"column":89}},"42":{"start":{"line":53,"column":15},"end":{"line":56,"column":22}},"43":{"start":{"line":58,"column":14},"end":{"line":58,"column":63}},"44":{"start":{"line":59,"column":16},"end":{"line":59,"column":56}},"45":{"start":{"line":61,"column":24},"end":{"line":61,"column":71}},"46":{"start":{"line":62,"column":14},"end":{"line":62,"column":76}},"47":{"start":{"line":63,"column":20},"end":{"line":65,"column":22}},"48":{"start":{"line":67,"column":13},"end":{"line":67,"column":51}},"49":{"start":{"line":70,"column":24},"end":{"line":70,"column":47}},"50":{"start":{"line":71,"column":17},"end":{"line":71,"column":67}},"51":{"start":{"line":73,"column":14},"end":{"line":73,"column":108}},"52":{"start":{"line":74,"column":14},"end":{"line":74,"column":87}},"53":{"start":{"line":75,"column":19},"end":{"line":75,"column":65}},"54":{"start":{"line":76,"column":20},"end":{"line":76,"column":70}},"55":{"start":{"line":78,"column":2},"end":{"line":87,"column":83}},"56":{"start":{"line":84,"column":75},"end":{"line":84,"column":139}},"57":{"start":{"line":91,"column":48},"end":{"line":94,"column":61}},"58":{"start":{"line":98,"column":0},"end":{"line":153,"column":64}},"59":{"start":{"line":106,"column":13},"end":{"line":106,"column":57}},"60":{"start":{"line":107,"column":12},"end":{"line":107,"column":89}},"61":{"start":{"line":108,"column":15},"end":{"line":111,"column":22}},"62":{"start":{"line":113,"column":14},"end":{"line":113,"column":63}},"63":{"start":{"line":114,"column":16},"end":{"line":114,"column":56}},"64":{"start":{"line":116,"column":24},"end":{"line":116,"column":71}},"65":{"start":{"line":117,"column":14},"end":{"line":117,"column":76}},"66":{"start":{"line":118,"column":20},"end":{"line":120,"column":22}},"67":{"start":{"line":122,"column":13},"end":{"line":122,"column":51}},"68":{"start":{"line":125,"column":24},"end":{"line":125,"column":47}},"69":{"start":{"line":126,"column":17},"end":{"line":126,"column":67}},"70":{"start":{"line":128,"column":14},"end":{"line":128,"column":108}},"71":{"start":{"line":129,"column":14},"end":{"line":129,"column":87}},"72":{"start":{"line":130,"column":19},"end":{"line":130,"column":65}},"73":{"start":{"line":131,"column":20},"end":{"line":131,"column":70}},"74":{"start":{"line":133,"column":2},"end":{"line":146,"column":83}},"75":{"start":{"line":143,"column":75},"end":{"line":143,"column":139}},"76":{"start":{"line":150,"column":68},"end":{"line":153,"column":61}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":4,"column":61},"end":{"line":4,"column":83}},"loc":{"start":{"line":4,"column":89},"end":{"line":4,"column":145}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":18,"column":18},"end":{"line":18,"column":19}},"loc":{"start":{"line":18,"column":46},"end":{"line":45,"column":34}},"line":18},"2":{"name":"AsyncItemLoader","decl":{"start":{"line":19,"column":11},"end":{"line":19,"column":26}},"loc":{"start":{"line":19,"column":29},"end":{"line":22,"column":3}},"line":19},"3":{"name":"handleLoadItems","decl":{"start":{"line":22,"column":90},"end":{"line":22,"column":105}},"loc":{"start":{"line":24,"column":4},"end":{"line":30,"column":5}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":18}},"loc":{"start":{"line":29,"column":29},"end":{"line":29,"column":112}},"line":29},"5":{"name":"render","decl":{"start":{"line":30,"column":42},"end":{"line":30,"column":48}},"loc":{"start":{"line":32,"column":4},"end":{"line":45,"column":5}},"line":32},"6":{"name":"(anonymous_6)","decl":{"start":{"line":35,"column":48},"end":{"line":35,"column":49}},"loc":{"start":{"line":35,"column":60},"end":{"line":35,"column":94}},"line":35},"7":{"name":"(anonymous_7)","decl":{"start":{"line":44,"column":65},"end":{"line":44,"column":66}},"loc":{"start":{"line":44,"column":78},"end":{"line":44,"column":138}},"line":44},"8":{"name":"(anonymous_8)","decl":{"start":{"line":50,"column":28},"end":{"line":50,"column":29}},"loc":{"start":{"line":50,"column":40},"end":{"line":90,"column":1}},"line":50},"9":{"name":"(anonymous_9)","decl":{"start":{"line":84,"column":58},"end":{"line":84,"column":59}},"loc":{"start":{"line":84,"column":74},"end":{"line":84,"column":140}},"line":84},"10":{"name":"(anonymous_10)","decl":{"start":{"line":91,"column":35},"end":{"line":91,"column":36}},"loc":{"start":{"line":91,"column":47},"end":{"line":94,"column":62}},"line":91},"11":{"name":"(anonymous_11)","decl":{"start":{"line":105,"column":48},"end":{"line":105,"column":49}},"loc":{"start":{"line":105,"column":60},"end":{"line":149,"column":1}},"line":105},"12":{"name":"(anonymous_12)","decl":{"start":{"line":143,"column":58},"end":{"line":143,"column":59}},"loc":{"start":{"line":143,"column":74},"end":{"line":143,"column":140}},"line":143},"13":{"name":"(anonymous_13)","decl":{"start":{"line":150,"column":55},"end":{"line":150,"column":56}},"loc":{"start":{"line":150,"column":67},"end":{"line":153,"column":62}},"line":150}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":97},"end":{"line":4,"column":143}},"type":"cond-expr","locations":[{"start":{"line":4,"column":121},"end":{"line":4,"column":124}},{"start":{"line":4,"column":127},"end":{"line":4,"column":143}}],"line":4},"1":{"loc":{"start":{"line":4,"column":97},"end":{"line":4,"column":118}},"type":"binary-expr","locations":[{"start":{"line":4,"column":97},"end":{"line":4,"column":100}},{"start":{"line":4,"column":104},"end":{"line":4,"column":118}}],"line":4},"2":{"loc":{"start":{"line":19,"column":143},"end":{"line":19,"column":210}},"type":"binary-expr","locations":[{"start":{"line":19,"column":143},"end":{"line":19,"column":168}},{"start":{"line":19,"column":172},"end":{"line":19,"column":210}}],"line":19},"3":{"loc":{"start":{"line":39,"column":6},"end":{"line":43,"column":7}},"type":"if","locations":[{"start":{"line":39,"column":6},"end":{"line":43,"column":7}},{"start":{"line":39,"column":6},"end":{"line":43,"column":7}}],"line":39},"4":{"loc":{"start":{"line":41,"column":13},"end":{"line":43,"column":7}},"type":"if","locations":[{"start":{"line":41,"column":13},"end":{"line":43,"column":7}},{"start":{"line":41,"column":13},"end":{"line":43,"column":7}}],"line":41},"5":{"loc":{"start":{"line":75,"column":19},"end":{"line":75,"column":65}},"type":"cond-expr","locations":[{"start":{"line":75,"column":26},"end":{"line":75,"column":45}},{"start":{"line":75,"column":48},"end":{"line":75,"column":65}}],"line":75},"6":{"loc":{"start":{"line":130,"column":19},"end":{"line":130,"column":65}},"type":"cond-expr","locations":[{"start":{"line":130,"column":26},"end":{"line":130,"column":45}},{"start":{"line":130,"column":48},"end":{"line":130,"column":65}}],"line":130}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0]}}}} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index bbcfcd39e120..1a5f9244773b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -12,7 +12,7 @@ module.exports = { '/lib', '/examples/cra-kitchen-sink', ], - testPathIgnorePatterns: ['/node_modules/'], + testPathIgnorePatterns: ['/node_modules/', 'addon-jest.test.js'], collectCoverage: false, collectCoverageFrom: [ 'app/**/*.{js,jsx}', diff --git a/lib/components/src/index.js b/lib/components/src/index.js index 446888e9dc92..b54c9a7134f2 100644 --- a/lib/components/src/index.js +++ b/lib/components/src/index.js @@ -1,4 +1,4 @@ -export { baseFonts } from './theme'; +export { baseFonts, monoFonts } from './theme'; export { default as RoutedLink } from './navigation/routed_link'; export { default as MenuLink } from './navigation/menu_link'; diff --git a/lib/components/src/theme.js b/lib/components/src/theme.js index cab72de3a511..be4f613c0ba3 100644 --- a/lib/components/src/theme.js +++ b/lib/components/src/theme.js @@ -4,3 +4,10 @@ export const baseFonts = { color: '#444', WebkitFontSmoothing: 'antialiased', }; + +export const monoFonts = { + fontFamily: + '"Operator Mono", "Fira Code Retina", "Fira Code", "FiraCode-Retina", "Andale Mono", "Lucida Console", Consolas, Monaco, monospace', + color: '#444', + WebkitFontSmoothing: 'antialiased', +}; diff --git a/package.json b/package.json index 71af2c2a1896..4708960b0fb0 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "precommit": "lint-staged", "coverage": "codecov", "danger": "danger", - "dev": "lerna exec --parallel -- babel src -d dist --ignore tests,__tests__,test.js,stories/,story.jsx --plugins \"transform-runtime\" --copy-files -w", + "dev": "lerna exec --parallel -- babel src -d dist --ignore tests/,__tests__/,.test.js,stories/,.story.js,.stories.js --plugins \"transform-runtime\" --copy-files -w", "docs:build": "npm --prefix docs run build", "docs:deploy:ci": "npm --prefix docs run deploy:ci", "docs:deploy:manual": "npm --prefix docs run deploy:manual", diff --git a/scripts/prepare.js b/scripts/prepare.js index 49ae22ded3b2..875695e2af50 100644 --- a/scripts/prepare.js +++ b/scripts/prepare.js @@ -11,7 +11,7 @@ shell.rm('-rf', 'dist'); const babel = path.join(__dirname, '..', 'node_modules', '.bin', 'babel'); const args = [ - '--ignore tests,__tests__,test.js,stories/,story.jsx', + '--ignore tests/*,__tests__/,**.test.js,stories/,**.story.js,**.stories.js', '--plugins "transform-runtime"', './src --out-dir ./dist', '--copy-files', diff --git a/yarn.lock b/yarn.lock index 7a6f23c430a4..795c73abb8b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6722,7 +6722,7 @@ jest@20.0.4: dependencies: jest-cli "^20.0.4" -jest@^21.2.0: +jest@^21.2.0, jest@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" dependencies: