__internalSetGlobalContext is currently reserved for internal use. This API would be useful for third party developers, specifically for testing. For example, if a developer wishes to publish a third party typed action which published diagnostic events, they may wish to register a MockDiagnosticsReporter to assert that diagnostic messages are correctly emitted.
This API should probably not be used in workflow files, and currently is only needed for diagnostics messages. So I'd propose keeping __internalSetGlobalContext internal for now, and exposing a mockDiagnosticsReporter function, with a JSDoc comment explaining that this is for testing only.
__internalSetGlobalContextis currently reserved for internal use. This API would be useful for third party developers, specifically for testing. For example, if a developer wishes to publish a third party typed action which published diagnostic events, they may wish to register aMockDiagnosticsReporterto assert that diagnostic messages are correctly emitted.This API should probably not be used in workflow files, and currently is only needed for diagnostics messages. So I'd propose keeping
__internalSetGlobalContextinternal for now, and exposing amockDiagnosticsReporterfunction, with a JSDoc comment explaining that this is for testing only.