diff --git a/plugin-server/tests/worker/ingestion/event-pipeline/prepareEventStep.test.ts b/plugin-server/tests/worker/ingestion/event-pipeline/prepareEventStep.test.ts index 8c203468348aa..9120a7a7e1fab 100644 --- a/plugin-server/tests/worker/ingestion/event-pipeline/prepareEventStep.test.ts +++ b/plugin-server/tests/worker/ingestion/event-pipeline/prepareEventStep.test.ts @@ -117,7 +117,7 @@ describe('prepareEventStep()', () => { it('extracts elements_chain from properties', async () => { const event: PluginEvent = { ...pluginEvent, ip: null, properties: { $elements_chain: 'random string', a: 1 } } const preppedEvent = await prepareEventStep(runner, event) - const [chEvent, _] = runner.eventsProcessor.createEvent(preppedEvent, person) + const [chEvent, _] = await runner.eventsProcessor.createEvent(preppedEvent, person) expect(chEvent.elements_chain).toEqual('random string') expect(chEvent.properties).toEqual('{"a":1}') @@ -134,7 +134,7 @@ describe('prepareEventStep()', () => { }, } const preppedEvent = await prepareEventStep(runner, event) - const [chEvent, _] = runner.eventsProcessor.createEvent(preppedEvent, person) + const [chEvent, _] = await runner.eventsProcessor.createEvent(preppedEvent, person) expect(chEvent.elements_chain).toEqual('random string') expect(chEvent.properties).toEqual('{"a":1}') @@ -148,7 +148,7 @@ describe('prepareEventStep()', () => { properties: { a: 1, $elements: [{ tag_name: 'div', nth_child: 1, nth_of_type: 2, $el_text: 'text' }] }, } const preppedEvent = await prepareEventStep(runner, event) - const [chEvent, _] = runner.eventsProcessor.createEvent(preppedEvent, person) + const [chEvent, _] = await runner.eventsProcessor.createEvent(preppedEvent, person) expect(chEvent.elements_chain).toEqual('div:nth-child="1"nth-of-type="2"text="text"') expect(chEvent.properties).toEqual('{"a":1}')