-
Notifications
You must be signed in to change notification settings - Fork 272
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
Run Jest (and react-native-testing-library tests) on Hermes? #1707
Comments
RNTL is focusing on provided RN testing utilities and env simulation, on top of Jest as a test runner. The selection of JS engine is probably the responsibility of JS runtime like node, deno, bun. Not sure if there are any JS runtimes which use Hermes, afaik most use either V8 or JSC. Out of curiosity, what inconsistencies have you encountered between V8 and Hermes? |
I had some inconsistencies as well, for example the |
Thanks @mdjastrzebski
In our case, the issue is around Date parsing. Our Jest tests run on node and will pass, while the code running on Hermes breaks.
Date expects an ISO 8601 format, but Non-standard format support depends on the implementation of the engine: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format:~:text=Non%2Dstandard%20strings,non%2Dstandard%20cases. A JSC/V8 engine will gracefully handle other formats because it has some fallbacks. Hermes doesn't yet. I created a Snack and shared it at facebook/hermes#865 (comment) if you want to play with it. I know it's not |
Closing as non-actionable. |
Hi everyone, I am asking here because I may have a better React Native audience:
Has anyone ever been able to run their tests on the Hermes engine instead of the normal Node V8 engine?
We have some inconsistencies between the behaviour of the code in our tests VS while running on a device (Hermes)
Happy to move this to the Jest repo (Hermes already said it's not their concern facebook/hermes#650), I get that it's not an RNTL concern initially.
Thanks!
The text was updated successfully, but these errors were encountered: