I get an Unexpected token error when running the Storyshots test. It happens at the @import from a SCSS file as well as the first bracket of a CSS file.
Stories work correctly but snapshot tests do not.
Import in the .storybook/config.js an SCSS or CSS file and run the test.
@storybook/react 3.1.9@storybook/addon-storyshots 3.3.10@jsanes can you please share your config.js / webpack.config.js / sotryshots test file?
Also, you've specified versions of something that is not clear what (And those versions are not matching, which is wrong). Do you use Storybook for react/angular/vue?
@igor-dv I'm using Storybook for React. Sorry for not clarifying the versions I'm using (markdown hid the first part). I just fixed it.
I have Storyshots working now. I had to install jest-css-modules and add "scriptPreprocessor": "<rootDir>/node_modules/jest-css-modules" to my jest configuration on package.json.
Cool !
Most helpful comment
@igor-dv I'm using Storybook for React. Sorry for not clarifying the versions I'm using (markdown hid the first part). I just fixed it.
I have Storyshots working now. I had to install
jest-css-modulesand add"scriptPreprocessor": "<rootDir>/node_modules/jest-css-modules"to myjestconfiguration onpackage.json.