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
The Jest test runner seems to get confused by Shoutem.
Steps to reproduce:
react-native init jestShoutem
yarn add @shoutem/ui
(in index.android.js) add import { Text } from '@shoutem/ui';
jest
Jest gives the output
FAIL __tests__\index.android.js
● Test suite failed to run
D:\Code\shoutemJest\node_modules\@shoutem\ui\index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { setDefaultThemeStyle } from './init';
^^^^^^
SyntaxError: Unexpected token import
at transformAndBuildScript (node_modules\jest-runtime\build\transform.js:320:12)
at Object.<anonymous> (index.android.js:13:9)
at Object.<anonymous> (__tests__\index.android.js:3:19)
Using Jest version 18.1.0, React Native version 0.41.0, node version 7.5.0, yarn version 0.19.1, @shoutem/ui version 0.10.8
The text was updated successfully, but these errors were encountered:
This is due to a problem with the jest configuration. It looks like the official recommendation is to use the transformIgnorePatters described above (jestjs/jest#2081), so I am closing this for now. Please let us know if anyone finds a better solution for this.
The Jest test runner seems to get confused by Shoutem.
Steps to reproduce:
react-native init jestShoutem
yarn add @shoutem/ui
index.android.js
) addimport { Text } from '@shoutem/ui';
jest
Jest gives the output
Using Jest version 18.1.0, React Native version 0.41.0, node version 7.5.0, yarn version 0.19.1, @shoutem/ui version 0.10.8
The text was updated successfully, but these errors were encountered: