[codex] regen native dirs in expo config plugin tests#691
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
thymikee
reviewed
Feb 25, 2026
|
|
||
| describe('plugin applies third-party config plugins correctly', () => { | ||
| test('react-native-bottom-tabs', async () => { | ||
| test.skip('react-native-bottom-tabs', async () => { |
thymikee
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes checked-in native fixture directories (
ios/andandroid/) from the Expo config plugins test app and changes the plugin test setup to regenerate native directories during test runs using the plugin’s ownregenNativeDirsflow.Problem
The Expo config plugin tests previously copied a fixture app that already contained committed native project files. That meant tests were not validating the plugin’s native regeneration path, and the repository carried a large amount of generated fixture content.
In local environments, tests could also become nondeterministic when developers had locally generated
ios/,android/, ornode_modulesdirectories inside the fixture app.User impact
For contributors and maintainers, this improves confidence that tests reflect real plugin behavior (
prebuild-style regeneration) and reduces maintenance burden from committed generated files.Root cause
The test harness used a static fixture copy as test input instead of constructing native directories through the same regeneration code path used by the plugin.
Fix
pluginExpoConfigPlugins.test.tssetup to:ios,android, andnode_modulesduring copy to keep test inputs deterministic,node_modules/@rock-js/platform-{ios,android}/template/...,regenNativeDirsbefore running assertions.withPrimaryColorassertion robust whencolors.xmlis absent in freshly regenerated template output.apps/expo-config-plugins-test-app.Validation
pnpm eslint packages/plugin-expo-config-plugins/src/__tests__/pluginExpoConfigPlugins.test.tspnpm vitest run packages/plugin-expo-config-plugins/src/__tests__/pluginExpoConfigPlugins.test.tsBoth pass with expected results.