Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5a06f5c

Browse files
authoredJan 27, 2025··
test(cli): fix test failing on Node 22 (#3498)
1 parent e58018f commit 5a06f5c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎.changeset/empty-mangos-smash.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎packages/cli/test/react-native-config.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { reactNativeConfig } from "../src/index";
33

44
describe("react-native.config.js", () => {
55
it("should still act as a plugin to `@react-native-community/cli`", () => {
6+
// We're using `--eval` instead of `--print` here because Node 22.x seems
7+
// to be truncating the output.
68
const { status, stdout } = spawnSync(process.argv0, [
79
"--no-warnings",
8-
"--print",
9-
`JSON.stringify(require("./react-native.config.js"))`,
10+
"--eval",
11+
`console.log(JSON.stringify(require("./react-native.config.js")))`,
1012
]);
1113

1214
expect(status).toBe(0);

0 commit comments

Comments
 (0)
Please sign in to comment.