Ask questionsStoryshots is leaking memory

Bug or support request summary


Steps to reproduce

See for example, but every single installation of storyshots (at least for React, haven't tested others) should reproduce without issue following the steps in the linked README.

To satisfy template:

  1. Install and setup storyshots
  2. Run jest
  3. See leakage either through Jest's builtin capabilities (logHeapUsage and detectLeaks) or using some OS tool to see memory usage.

Please specify which version of Storybook and optionally any affected addons that you're running

"@storybook/addon-storyshots": "^3.3.15",
"@storybook/react": "^3.3.15",

Affected platforms

  • Jest@22.4.3

Screenshots / Screencast / Code Snippets (Optional)


(A bonus would be to remove the info => Loading custom .babelrc text...)


Answer questions bastiRe

We had the same problem and fixed it for us by separating our storyshots by folder into different testsuites. We accomplished this by creating separate Storyshot files and using the storyKindRegex to only snapshot a specific subset of stories in each file.


Related questions

TS1086: An accessor cannot be declared in an ambient context hot 13
Unexpected default export without title: {"includeStories":[],"parameters":{"docs":{}}} hot 7
Addon-docs: Vue component is not extendable and throws error
Unexpected value 'undefined' declared by the module 'DynamicModule' hot 3
Peer dependency warnings hot 3
use storybook with vue and vue-i18n hot 3
Issue with angular Router hot 2
Storybook interface not loading on IE11 hot 2
Error on rendering story (probably related to babel) hot 2
Static file path returned instead of file content on require('./file.svg') hot 2
Addon-docs: Preview code of imported html component in MDX hot 2
Storybook 5.3 Release 🙌 hot 2
Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory hot 2
Load svg using vue-svg-loader not working hot 2
Storybook 5.2 has issues with TypeScript types hot 2
Github User Rank List