Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest bug with expo when using another dependency such as @shoutem #1316

Closed
archywillhe opened this issue Jan 24, 2018 · 5 comments
Closed

Jest bug with expo when using another dependency such as @shoutem #1316

archywillhe opened this issue Jan 24, 2018 · 5 comments
Assignees

Comments

@archywillhe
Copy link

Version:

 "expo": {
    "sdkVersion": "25.0.0"
  }

Jest Test always failed with syntax error

  /Users/a/ArchyBox/lateJan/Archy/node_modules/@expo/vector-icons/fonts/MaterialIcons.ttf:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){


SyntaxError: Invalid or unexpected token

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:318:17)
      at Object.<anonymous> (node_modules/@expo/vector-icons/MaterialIcons.js:4:64)
      at Object.<anonymous> (node_modules/@shoutem/ui/components/ImagePreview.js:10:20)

Current config for jest ("jest-expo": "25.0.0")

  "jest": {
    "preset": "jest-expo",
    "transformIgnorePatterns": [
          "node_modules/(?!react-native|expo|@expo|react-navigation|native-base-shoutem-theme|@shoutem/theme|@shoutem/animation|@shoutem/ui|tcomb-form-native)"
    ]
  },

Runs fine without third party dependency @shotem. Error only arises when added @shotem and "transformIgnorePatterns".

@archywillhe
Copy link
Author

archywillhe commented Jan 24, 2018

repost: jestjs/jest#5381, shoutem/ui#362

@archywillhe
Copy link
Author

archywillhe commented Jan 24, 2018

related: shoutem/ui#151, jestjs/jest#2081

@archywillhe
Copy link
Author

archywillhe commented Jan 25, 2018

@ide
Copy link
Member

ide commented Jan 25, 2018

Merging this into another issue for what appears to be the same bug: #1317

@ide ide closed this as completed Jan 25, 2018
@brentvatne
Copy link
Member

try out jest-expo@25.1.0-beta.0 and let me know if it resolves your problem

@lock lock bot added the outdated label Jun 15, 2019
@lock lock bot locked and limited conversation to collaborators Jun 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants