react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
254 stars 2 forks source link

Jest fails to start tests after upgrade from react-native v0.70.5 to 0.73.6 #275

Open atrofimenko opened 4 months ago

atrofimenko commented 4 months ago

Environment

System: OS: macOS 14.4 CPU: (14) arm64 Apple M3 Max Memory: 58.73 MB / 36.00 GB Shell: version: 3.2.57 path: /bin/bash Binaries: Node: version: 18.20.2 path: ~/.nvm/versions/node/v18.20.2/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 10.5.0 path: ~/.nvm/versions/node/v18.20.2/bin/npm Watchman: version: 2024.04.22.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

Upgrading version

0.70.5

Description

Trying to start my tests that worked before update, and them fails with a message: Configuration error:

Could not locate module  mapped as:
/Users/a.trofimenko/Documents/Work/ReactNativeProjects/zirtue-app/src/$1.

Please check your configuration for these entries:
{
  "moduleNameMapper": {
    "/^(.*)$/": "/Users/a.trofimenko/Documents/Work/ReactNativeProjects/zirtue-app/src/$1"
  },
  "resolver": undefined
}

Tried to do something with moduleNameMapper, but it didtn't help me. Need your help very much! Thank you! My config files and test example with imports:

Screenshot 2024-05-13 at 15 53 51 Screenshot 2024-05-13 at 15 53 34 Screenshot 2024-05-13 at 15 53 28

cleberada commented 1 month ago

@atrofimenko Did you had any luck on that?