-
Notifications
You must be signed in to change notification settings - Fork 5
Add Expo tests #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Add Expo tests #618
Conversation
It doesn't work on Expo and isn't really used much anyway
Browser bundle sizeNPM build
CDN build
Code coverageCoverage values did not change👌. Total:
Generated against c815325 on 30 April 2025 at 11:45:54 UTC |
|
||
export default function HomeScreen() { | ||
|
||
const [currentScenario, setCurrentScenario] = useState<any>(null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we set just the scenario name here and select the component dynamically? I think this is probably quite a lot of information to store in state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's true - we certainly could, I just decided not to because it makes the withInstrumentedAppStarts
scenario a more awkward to deal with - that component needs to be wrapped so we'd need to do that in each of the index.js files instead.
As it's just a test app and we only set that state once when we start the scenario I don't think it matters too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it work with something like:
import scenarios from '../scenario-launcher/scenarios'
const [currentScenario, setCurrentScenario] = useState('ExpoScenario')
currentScenario && <scenarios[currentScenario].Component />
Goal
Add Expo builds and tests to CI pipeline.
Design
Test fixtures are generated dynamically and tests run (more or less) the same test suite as React Native, against the latest 3 Expo versions (currently 52, 51 and 50).
Had to remove the
react-native-dotenv
dependency from the scenario launcher as this doesn't work on Expo - this was just a convenience tool for running scenarios locally but isn't really necessary.Testing
Covered by CI