Skip to content

SyntaxError: Unexpected token export using jest #39

Closed
@loic-lopez

Description

@loic-lopez

Current behavior

/@react-native-community/async-storage/lib/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export default from './AsyncStorage';

 SyntaxError: Unexpected token export

    > 1 | import AsyncStorage  from "@react-native-community/async-storage"
        | ^
      2 | 
      3 | /**
      4 |  * Loads a string from storage.

Repro steps

import @react-native-community/async-storage and test with jest.

Environment

  • Async Storage version: 1.2.1
  • React-Native version: 0.57.7
  • Platform tested: iOS / Android
  • Jest version: 24.0.11
  • Logs/Error that are relevant: see above

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions