When using a simple snapshot test with import done as below, jest test fail.
TypeError: Invalid value used as weak map key
at WeakMap.set (<anonymous>)
3 | import Circles from "react-native-android-circles";
4 | import PropTypes from "prop-types";
> 5 | import * as Animatable from "react-native-animatable";
| ^
6 | import { Image, StyleSheet, Text, View } from "react-native";
7 |
8 | export default class ApiLoader extends Component {
at _interopRequireWildcard (node_modules/@babel/runtime/helpers/interopRequireWildcard.js:47:11)
at Object.<anonymous> (src/ui/widget/ApiLoader.js:5:18)
at Object.<anonymous> (src/ui/widget/__tests__/ApiLoader.test.js:7:21)
When using a simple snapshot test with import done as below, jest test fail.
version: 1.3.0 RN version: 61.5 jest version: 24.9.0 babel core/runtime version: 7.6.2
This library is already added in jest config section of
transformIgnorePatterns
but this issue still occurs.The issue does not occur if used in following way: