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
FAIL ./Storyshots.test.js
● Test suite failed to run
/Users/fabricio/mnmo/active/crave/farmblocks/node_modules/@crave/farmblocks-alert/src/index.story.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React from "react";
^^^^^^
SyntaxError: Unexpected token import
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
at node_modules/@storybook/addon-storyshots/dist/require_context.js:39:24
at Array.forEach (<anonymous>)
at requireModules (node_modules/@storybook/addon-storyshots/dist/require_context.js:34:9)
at node_modules/@storybook/addon-storyshots/dist/require_context.js:48:7
at Array.forEach (<anonymous>)
After some investigation, the problem seem to be with the storybook config file, that currently use the following regex to find story.js files:
Currently we are using an ugly workaround to avoid the jest / babel bug that causes jest to not transpile es modules imports.
The workaround is to re-add jest as a dev dependency after installing everything, see:
farmblocks/.travis.yml
Line 25 in 2496b87
But after updating yarn to 1.2.1 that workaround will no longer work. So we need a permanent fix.
Some (old?) references / hints:
The text was updated successfully, but these errors were encountered: