Skip to content

Commit

Permalink
Add missing awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 29, 2024
1 parent c0345d0 commit 918ec02
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand All @@ -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}')
Expand All @@ -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}')
Expand Down

0 comments on commit 918ec02

Please sign in to comment.