You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm attempting to use both SCS and Storyshots add-ons in my production project. storybook-chrome-screenshot exits successfully but jest was failed. The full jest log is the following:
$ NODE_ENV=test jest storyshots.js
=> Loading custom .babelrc
FAIL frontend/storyshots.js
● Test suite failed to run
storybook-chrome-screenshot does not support "undefined".
at Object.<anonymous> (node_modules/storybook-chrome-screenshot/lib/withScreenshot.js:20:15)
at Object.<anonymous> (node_modules/storybook-chrome-screenshot/lib/index.js:6:24)
at newRequire (node_modules/@storybook/addon-storyshots/dist/require_context.js:76:12)
at evalmachine.<anonymous>:224:34
at runWithRequireContext (node_modules/@storybook/addon-storyshots/dist/require_context.js:102:3)
at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/index.js:120:35)
at Object.<anonymous> (frontend/storyshots.js:27:31)
Are there somebody whose some workarounds?
.storybook/config.js
import { configure, addDecorator } from '@storybook/react'
import bgs from '#/storybookDecorators/backgrounds'
import { initScreenshot, withScreenshot } from 'storybook-chrome-screenshot'
import 'babel-polyfill'
function loadStories() {
const req = require.context('../src', true, /\.stories\.jsx$/)
req.keys().forEach(filename => req(filename))
}
addDecorator(initScreenshot())
addDecorator(bgs())
addDecorator(withScreenshot())
configure(loadStories, module)
Hi. I'm attempting to use both SCS and Storyshots add-ons in my production project.
storybook-chrome-screenshot
exits successfully butjest
was failed. The full jest log is the following:$ NODE_ENV=test jest storyshots.js => Loading custom .babelrc FAIL frontend/storyshots.js ● Test suite failed to run storybook-chrome-screenshot does not support "undefined". at Object.<anonymous> (node_modules/storybook-chrome-screenshot/lib/withScreenshot.js:20:15) at Object.<anonymous> (node_modules/storybook-chrome-screenshot/lib/index.js:6:24) at newRequire (node_modules/@storybook/addon-storyshots/dist/require_context.js:76:12) at evalmachine.<anonymous>:224:34 at runWithRequireContext (node_modules/@storybook/addon-storyshots/dist/require_context.js:102:3) at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/index.js:120:35) at Object.<anonymous> (frontend/storyshots.js:27:31)
Are there somebody whose some workarounds?
The text was updated successfully, but these errors were encountered: