Bit-Nation / BITNATION-Pangea-mobile

Pangea iOS and Android repository
MIT License
52 stars 13 forks source link

[panthalassa] jest + babel don't transpile from node_modules #23

Closed florianlenz closed 6 years ago

florianlenz commented 6 years ago

Issue

Panthalassa (an external lib) is mostly written in flow (flow is an opt in type checker (like typescript)). When I start the project with yarn run ios it's starting correct (no transpile errors). BUT when I run the test's I am getting this error:

Test suite failed to run

/Users/florian/project/BITNATION-Pangea-mobile/node_modules/BITNATION-Panthalassa/src/specification/secureStorageInterface.js:7
export interface SecureStorage {
^^^^^^

SyntaxError: Unexpected token export

34 | return sSImplementation;
35 |
> 36 | }
37 |

at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:318:17)
at Object.<anonymous> (src/services/panthalassa/secureStorage.js:36:181)
at Object.<anonymous> (__tests__/src/services/panthalassa/secureStorage.js:1:109)

Basically jest don't use babel correctly.

Acceptance criteria

seland commented 6 years ago

@florianlenz Is that still happens?

florianlenz commented 6 years ago

Nope, solved.