fix: Changes to fix ee jest test (#22188)

Changes to fix the jest test failure on EE.
This commit is contained in:
Rishabh Rathod 2023-04-10 11:13:31 +05:30 committed by GitHub
parent bdb9fe8d54
commit df9c684db1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ export enum BatchKey {
process_batched_triggers = "process_batched_triggers",
process_batched_fn_execution = "process_batched_fn_execution",
process_js_variable_updates = "process_js_variable_updates",
process_batched_fn_invoke_log = "process_batched_fn_invoke_log",
}
const TriggerEmitter = new EventEmitter();
@ -146,4 +147,13 @@ TriggerEmitter.on(
jsVariableUpdatesHandlerWrapper,
);
export const fnInvokeLogHandler = priorityBatchedActionHandler((data) => {
WorkerMessenger.ping({
method: MAIN_THREAD_ACTION.LOG_JS_FUNCTION_EXECUTION,
data,
});
});
TriggerEmitter.on(BatchKey.process_batched_fn_invoke_log, fnInvokeLogHandler);
export default TriggerEmitter;