storycap icon indicating copy to clipboard operation
storycap copied to clipboard

storybook-chrome-screenshot does not support "undefined".

Open shenghu opened this issue 6 years ago • 2 comments

I get this error when I follow README to use it.

FAIL  tests/storyshot/storyshot.spec.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 Object.<anonymous> (tests/storyshot/storyshot.spec.js:20:34)

Checking withScreenshot.js:20:15, it needs window.STORYBOOK_ENV. How to set it or pass it?

shenghu avatar Apr 08 '18 18:04 shenghu

Hi @shenghu, Thank you for Issue! but, sorry for late response :sob:

Basically window.STORYBOOK_ENV is set by storybook, so you do not have to set it yourself. If you provide the minimum source code that can reproduce the problem, it may be helpful :smiley:

wadackel avatar Apr 24 '18 13:04 wadackel

window.STORYBOOK_ENV is undefined. No one sets it, only storybook-chrome-screenshot and knobs read it.

theKashey avatar Apr 25 '18 13:04 theKashey