Add device event emit test for the sample C++ TurboModule (#36278)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36278

[Changelog][Internal]

The diff creates a test clause for [TurboModule::emitDeviceEvent C++ API for TurboModules](https://www.internalfb.com/code/fbsource/[929870c905c8fe68cb330ce96bda7eb703bb6ae6]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h?lines=90), which can be seen in either Catalyst or RNTester.

Reviewed By: cipolleschi

Differential Revision: D43466327

fbshipit-source-id: ff4c111b4beaab72b13d2bd89ed03023c9c7b3cf
This commit is contained in:
Ruslan Shestopalyuk
2023-02-24 06:49:14 -08:00
committed by Facebook GitHub Bot
parent bf03e86bc7
commit e106a62b1a
4 changed files with 32 additions and 1 deletions
@@ -71,6 +71,7 @@ export interface Spec extends TurboModule {
+getValueWithCallback: (callback: (value: string) => void) => void;
+getValueWithPromise: (error: boolean) => Promise<string>;
+voidFunc: () => void;
+emitCustomDeviceEvent: (eventName: string) => void;
}
export default (TurboModuleRegistry.get<Spec>(