-
Notifications
You must be signed in to change notification settings - Fork 7
Check for REACT_NATIVE_OVERRIDE_HERMES_DIR earlier
#246
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "react-native-node-api": patch | ||
| --- | ||
|
|
||
| Move REACT_NATIVE_OVERRIDE_HERMES_DIR out of tasks to fail earlier |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,11 +12,11 @@ describe( | |
| // Skipping these tests by default, as they download a lot and takes a long time | ||
| { skip: process.env.ENABLE_GRADLE_TESTS !== "true" }, | ||
| () => { | ||
| describe("checkHermesOverride task", () => { | ||
| describe("linkNodeApiModules task", () => { | ||
| it("should fail if REACT_NATIVE_OVERRIDE_HERMES_DIR is not set", () => { | ||
| const { status, stdout, stderr } = cp.spawnSync( | ||
| "sh", | ||
| ["gradlew", "react-native-node-api:checkHermesOverride"], | ||
| ["gradlew", "react-native-node-api:linkNodeApiModules"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Test Misplaced: Hermes Directory CheckThe test "should fail if REACT_NATIVE_OVERRIDE_HERMES_DIR is not set" is nested under the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need some task which wouldn't fail if the feature is broken, which is why I put it here. |
||
| { | ||
| cwd: TEST_APP_ANDROID_PATH, | ||
| env: { | ||
|
|
@@ -45,15 +45,18 @@ describe( | |
| /And follow this guide to build React Native from source/, | ||
| ); | ||
| }); | ||
| }); | ||
|
|
||
| describe("linkNodeApiModules task", () => { | ||
| it("should call the CLI to autolink", () => { | ||
| const { status, stdout, stderr } = cp.spawnSync( | ||
| "sh", | ||
| ["gradlew", "react-native-node-api:linkNodeApiModules"], | ||
| { | ||
| cwd: TEST_APP_ANDROID_PATH, | ||
| env: { | ||
| ...process.env, | ||
| // We're passing some directory which exists | ||
| REACT_NATIVE_OVERRIDE_HERMES_DIR: __dirname, | ||
| }, | ||
| encoding: "utf-8", | ||
| }, | ||
| ); | ||
|
|
||
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.
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.
putting in separate examples for powershell and cmd prompt probably isn't reasonable, but hopefully this will make it clear (to a human and LLM) not to try to paste this command.
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.
I pushed this as d8872b6 to main 👍