From 09187491a64ac180b07b989c99d2263a4ff1bcf4 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 17 Apr 2025 12:48:28 -0700 Subject: [PATCH] Align __test_fixtures__ to __fixtures__ (#50785) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50785 Enables us to simplify exclude patterns in `package.json#files`. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D73185320 fbshipit-source-id: 40219a0e440740bec35876fff6e37e4bf4fe9ddc --- packages/react-native/package.json | 1 - .../{__test_fixtures__ => __fixtures__}/fixtures.js | 0 .../test-app/lib/test-library/package.json | 0 .../test-app/package.json | 0 .../test-library-2/test-library-2.podspec | 0 .../test-library/test-library.podspec | 0 .../codegen/__tests__/generate-artifacts-executor-test.js | 8 ++++---- .../codegen/__tests__/generate-specs-cli-executor-test.js | 2 +- 8 files changed, 5 insertions(+), 6 deletions(-) rename packages/react-native/scripts/codegen/{__test_fixtures__ => __fixtures__}/fixtures.js (100%) rename packages/react-native/scripts/codegen/{__test_fixtures__ => __fixtures__}/test-app/lib/test-library/package.json (100%) rename packages/react-native/scripts/codegen/{__test_fixtures__ => __fixtures__}/test-app/package.json (100%) rename packages/react-native/scripts/codegen/{__test_fixtures__ => __fixtures__}/test-library-2/test-library-2.podspec (100%) rename packages/react-native/scripts/codegen/{__test_fixtures__ => __fixtures__}/test-library/test-library.podspec (100%) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index e53c0ed6515..6955cfac485 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -101,7 +101,6 @@ "!**/__fixtures__/**", "!**/__flowtests__/**", "!**/__mocks__/**", - "!**/__test_fixtures__/**", "!**/__tests__/**", "!**/__typetests__/**" ], diff --git a/packages/react-native/scripts/codegen/__test_fixtures__/fixtures.js b/packages/react-native/scripts/codegen/__fixtures__/fixtures.js similarity index 100% rename from packages/react-native/scripts/codegen/__test_fixtures__/fixtures.js rename to packages/react-native/scripts/codegen/__fixtures__/fixtures.js diff --git a/packages/react-native/scripts/codegen/__test_fixtures__/test-app/lib/test-library/package.json b/packages/react-native/scripts/codegen/__fixtures__/test-app/lib/test-library/package.json similarity index 100% rename from packages/react-native/scripts/codegen/__test_fixtures__/test-app/lib/test-library/package.json rename to packages/react-native/scripts/codegen/__fixtures__/test-app/lib/test-library/package.json diff --git a/packages/react-native/scripts/codegen/__test_fixtures__/test-app/package.json b/packages/react-native/scripts/codegen/__fixtures__/test-app/package.json similarity index 100% rename from packages/react-native/scripts/codegen/__test_fixtures__/test-app/package.json rename to packages/react-native/scripts/codegen/__fixtures__/test-app/package.json diff --git a/packages/react-native/scripts/codegen/__test_fixtures__/test-library-2/test-library-2.podspec b/packages/react-native/scripts/codegen/__fixtures__/test-library-2/test-library-2.podspec similarity index 100% rename from packages/react-native/scripts/codegen/__test_fixtures__/test-library-2/test-library-2.podspec rename to packages/react-native/scripts/codegen/__fixtures__/test-library-2/test-library-2.podspec diff --git a/packages/react-native/scripts/codegen/__test_fixtures__/test-library/test-library.podspec b/packages/react-native/scripts/codegen/__fixtures__/test-library/test-library.podspec similarity index 100% rename from packages/react-native/scripts/codegen/__test_fixtures__/test-library/test-library.podspec rename to packages/react-native/scripts/codegen/__fixtures__/test-library/test-library.podspec diff --git a/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js b/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js index 0967f22e8f4..44aafd91f7c 100644 --- a/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js +++ b/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js @@ -10,7 +10,7 @@ 'use strict'; -const fixtures = require('../__test_fixtures__/fixtures'); +const fixtures = require('../__fixtures__/fixtures'); const {execute} = require('../generate-artifacts-executor'); const { extractSupportedApplePlatforms, @@ -29,7 +29,7 @@ const packageJson = JSON.stringify({ }); describe('execute', () => { - const appDir = path.join(__dirname, '../__test_fixtures__/test-app'); + const appDir = path.join(__dirname, '../__fixtures__/test-app'); const outputDir = path.join(appDir, 'temp'); beforeAll(() => { @@ -136,7 +136,7 @@ describe('extractSupportedApplePlatforms', () => { const myDependency = 'test-library'; const myDependencyPath = path.join( __dirname, - `../__test_fixtures__/${myDependency}`, + `../__fixtures__/${myDependency}`, ); let platforms = extractSupportedApplePlatforms( myDependency, @@ -154,7 +154,7 @@ describe('extractSupportedApplePlatforms', () => { const myDependency = 'test-library-2'; const myDependencyPath = path.join( __dirname, - `../__test_fixtures__/${myDependency}`, + `../__fixtures__/${myDependency}`, ); let platforms = extractSupportedApplePlatforms( myDependency, diff --git a/packages/react-native/scripts/codegen/__tests__/generate-specs-cli-executor-test.js b/packages/react-native/scripts/codegen/__tests__/generate-specs-cli-executor-test.js index 4e221f3b6a8..b90f4945564 100644 --- a/packages/react-native/scripts/codegen/__tests__/generate-specs-cli-executor-test.js +++ b/packages/react-native/scripts/codegen/__tests__/generate-specs-cli-executor-test.js @@ -10,7 +10,7 @@ 'use strict'; -const fixtures = require('../__test_fixtures__/fixtures'); +const fixtures = require('../__fixtures__/fixtures'); const sut = require('../generate-specs-cli-executor'); const {normalize} = require('path');