Skip to content

Conversation

@bheemreddy-samsara
Copy link
Contributor

Updates @react-native-harness/runtime to use @vitest/expect@4.0.16 (which depends on chai ^6.2.x) instead of chai 5.x.

Motivation: Hermes cannot parse BigInt literals (e.g. 0n) present in chai@5.3.3, which breaks on-device harness runs.

@vercel
Copy link

vercel bot commented Dec 23, 2025

@bheemreddy-samsara is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

Update vitest expect/spy to 4.0.16 so runtime uses chai ^6.2.x.

This avoids BigInt literal (0n) parsing failures in Hermes.
@bheemreddy-samsara bheemreddy-samsara force-pushed the bheemreddy-samsara/bump-chai-6 branch from 341ec7b to 955a87e Compare December 23, 2025 01:41
@bheemreddy-samsara
Copy link
Contributor Author

@V3RON Can i get a review ?

@bheemreddy-samsara
Copy link
Contributor Author

ref chaijs/chai#1748

@V3RON
Copy link
Contributor

V3RON commented Dec 23, 2025

Hi @bheemreddy-samsara!
Thank you for the PR!
I'll definitely merge it as soon as the test run finishes, but I'm curious - under what circumstances does the test run crash? Harness is running in a couple of repositories, and this is the first time I've heard of such an issue.

@bheemreddy-samsara
Copy link
Contributor Author

bheemreddy-samsara commented Dec 23, 2025

Thanks! @V3RON

This doesn’t show up in the repo’s JS/unit tests — it happens when the harness runtime is executed inside the app (Hermes) on device/simulator.

In our RN App we saw the app crash on startup with a Hermes parse error like:

SyntaxError: No identifiers allowed directly after numeric literal

Root cause is chai@5.x shipping BigInt literals (e.g. 0n in closeTo); Hermes (in our RN/Hermes config) can’t parse BigInt literals in the bundle, so the runtime blows up before tests can run.

Bumping to chai@6.2.2 (via @vitest/expect@4.0.16) removes those BigInt literals (ref chaijs/chai#1748), so on-device harness runs are stable.

@V3RON
Copy link
Contributor

V3RON commented Dec 23, 2025

There is a job running Harness tests… testing Harness 😄
The last time it ran was last month, but as you can see in the history, it was successful.
https://github.com/callstackincubator/react-native-harness/actions/workflows/e2e-tests.yml

Nevertheless, there is nothing wrong with bumping vitest/expect. Thanks!

@V3RON V3RON merged commit 2f7c1ac into callstackincubator:main Dec 23, 2025
1 of 2 checks passed
@bheemreddy-samsara bheemreddy-samsara deleted the bheemreddy-samsara/bump-chai-6 branch December 23, 2025 16:49
@bheemreddy-samsara
Copy link
Contributor Author

There is a job running Harness tests… testing Harness 😄 The last time it ran was last month, but as you can see in the history, it was successful. https://github.com/callstackincubator/react-native-harness/actions/workflows/e2e-tests.yml

Nevertheless, there is nothing wrong with bumping vitest/expect. Thanks!

The harness repo’s E2E runs against the playground app on RN 0.82.1 (Metro 0.83.3, iOS hermes-engine 0.82.1).Our app is on RN 0.79.5 (Metro 0.82.4).The chai BigInt literal crash reproduces for us in that older RN/Metro/Hermes stack, while your E2E app uses the newer stack where it doesn’t repro. Thanks for the merge. Happy Holidays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants