Skip to content

Commit

Permalink
fix: running local tests (facebook#46615)
Browse files Browse the repository at this point in the history
Summary:
This PR fixes running local tests.

### Before

Tests from Pods/ are executed (including Hermes tests)

![CleanShot 2024-09-24 at 10 09 04@2x](https://github.com/user-attachments/assets/5d766321-1099-4970-bc4d-cf20ec1f5d89)

### After

![CleanShot 2024-09-24 at 10 10 24@2x](https://github.com/user-attachments/assets/356b0db3-9278-4cb3-a216-2ca78b623950)

## Changelog:

[INTERNAL] [FIXED] - Make tests run locally

Pull Request resolved: facebook#46615

Test Plan: 1. Run yarn run test (with and without the change). Make sure you have installed pods.

Reviewed By: huntie

Differential Revision: D63383063

Pulled By: cipolleschi

fbshipit-source-id: d7352f80c0fe4efdbb169e1adc4d5f60179f78e8
  • Loading branch information
okwasniewski authored and facebook-github-bot committed Sep 25, 2024
1 parent 99ab845 commit 5bd751b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

const {defaults} = require('jest-config');

const PODS_LOCATIONS = [
'packages/rn-tester/Pods',
'packages/helloworld/ios/Pods',
];

module.exports = {
transform: {
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$':
Expand All @@ -33,14 +38,20 @@ module.exports = {
'<rootDir>/packages/react-native/sdks',
'<rootDir>/packages/react-native/Libraries/Renderer',
'<rootDir>/packages/react-native-test-renderer/src',
'<rootDir>/packages/react-native/sdks/hermes/',
...PODS_LOCATIONS,
],
transformIgnorePatterns: ['node_modules/(?!@react-native/)'],
haste: {
defaultPlatform: 'ios',
platforms: ['ios', 'android'],
},
moduleFileExtensions: ['fb.js'].concat(defaults.moduleFileExtensions),
modulePathIgnorePatterns: ['scripts/.*/__fixtures__/'],
modulePathIgnorePatterns: [
'scripts/.*/__fixtures__/',
'<rootDir>/packages/react-native/sdks/hermes/',
...PODS_LOCATIONS,
],
unmockedModulePathPatterns: [
'node_modules/react/',
'packages/react-native/Libraries/Renderer',
Expand Down

0 comments on commit 5bd751b

Please sign in to comment.