Commit Graph

3 Commits

Author SHA1 Message Date
Rubén Norte 0580e88aa5 Allow tests to specify opt/dev mode (#48022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48022

Changelog: [internal]

This adds support for Fantom options in tests to configure different aspects of the test execution.

For now, it only supports specifying the mode (dev or opt) so we can try things without having to change the runner (watch mode still works if you change mode :D).

Fantom options are specified as pragmas in the docblock of the test. E.g.:

```
/**
 * flow strict-local
 * format
 * fantom_mode opt
 */
```

We expect this is mostly going to be used for one-time tests and that regular tests won't specify the mode (they'll just run in dev mode).

Maybe we can evolve this in the future to specify that you want a test to be executed in both modes, to ensure the behavior is consistent in dev/prod.

Reviewed By: rshest

Differential Revision: D66597626

fbshipit-source-id: b12325fc2235740cc2a3e0283d6a556091c1794c
2024-12-02 06:06:26 -08:00
Rubén Norte 762389f775 Extract logic to debug command errors to shared function (#48019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48019

Changelog: [internal]

Just a minor refactor to reduce code duplication.

Reviewed By: rshest

Differential Revision: D66596730

fbshipit-source-id: 2afa501cd5664402adf4aceba059a4d987c3ed62
2024-12-02 06:06:26 -08:00
Rubén Norte 21cc745d51 Extract some logic from runner to utils module (#48014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48014

Changelog: [internal]

Just a small refactor in preparation for a following change that will add more usages for these utilities. It also cleans up the runner file which is good too.

Reviewed By: javache

Differential Revision: D66595405

fbshipit-source-id: e734d76006ce937fadd1cb673035db85a3e838dd
2024-12-02 06:06:26 -08:00