From 1a40a9438fa4944e41a9794a1e2e4da2cb367cb6 Mon Sep 17 00:00:00 2001 From: James Ide Date: Sat, 28 Nov 2026 02:32:43 -0800 Subject: [PATCH] Use fs.rmSync to clean up after the codegen executor test Node 26 no longer accepts the `recursive` option of `fs.rmdirSync`: the call throws ERR_INVALID_ARG_VALUE. The `afterAll` in generate-artifacts-executor-test.js makes that call, so on Node 26 Jest reports the suite as failed although all 52 of its tests pass. Remove the output directory with `fs.rmSync(path, {recursive: true, force: true})`, the replacement that Node's deprecation notice (DEP0147) gives and the call the rest of the file already uses. Co-Authored-By: Claude Opus 5.5 --- .../codegen/__tests__/generate-artifacts-executor-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js b/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js index 2a5aec0ce098..42c45381d1b7 100644 --- a/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js +++ b/packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js @@ -43,7 +43,7 @@ const packageJson = JSON.stringify({ }); afterAll(() => { - fs.rmdirSync(outputDir, {recursive: true}); + fs.rmSync(outputDir, {recursive: true, force: true}); }); [