test: Change workflows to test from safe list to skip list (#5457)

* Remove check by safe list to skip list

* add an option to skip using statistics events

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
agobrech
2023-02-10 17:11:06 +01:00
committed by GitHub
parent 21e9af09a7
commit 309c995364
2 changed files with 4 additions and 1 deletions

View File

@@ -2,6 +2,8 @@ import { eventEmitter } from 'n8n-core';
import { nodeFetchedData, workflowExecutionCompleted } from './WorkflowStatistics';
export function initEvents() {
if ('SKIP_STATISTICS_EVENTS' in process.env) return;
// Check for undefined as during testing these functions end up undefined for some reason
if (nodeFetchedData) {
eventEmitter.on(eventEmitter.types.nodeFetchedData, nodeFetchedData);