mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: Pull Request resolved: https://github.com/react/react-native/pull/58095 `RCTTestModule` is a TurboModule: it conforms to `NativeTestModuleSpec` and returns `NativeTestModuleSpecJSI` from `getTurboModule:`, so JS->ObjC dispatch is driven by codegen, not by `RCT_EXPORT_METHOD`'s `__rct_export__` metadata. The macro is dead weight. Convert the three spec-declared methods to plain ObjC declarations; conformance to `NativeTestModuleSpec` keeps their signatures compiler-enforced. ``` - (void)markTestCompleted; - (void)markTestPassed:(BOOL)success; - (void)verifySnapshot:(RCTResponseSenderBlock)callback; ``` `sendAppEvent:body:` keeps its macro because it is not declared in the spec protocol, and the two `RCT_REMAP_METHOD` exports keep theirs because they define custom JS names. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D117201272 fbshipit-source-id: 38101da690d8267f8ac4291f9bfc14ab75fd45d3