Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi22186 committed Oct 25, 2024
1 parent f170f4f commit 3ab029a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/src/config/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,14 @@ var pluses = /\+/g,
return mParticle.getInstance()._Persistence.getLocalStorage();
}
},
// https://go.mparticle.com/work/SQDSDKS-6894
findEventFromBatch = function(batch, eventName) {
if (batch.events.length) {
return batch.events.find(function(event) {
switch (event.event_type) {
case 'screen_view':
// The SDK sets "PageView" as the default for a screen_name if one is not provided
return ['PageView', eventName].indexOf(event.data.screen_name) > -1;
return ['PageView', eventName].includes(event.data.screen_name);
case 'commerce_event':
if (event.data.product_action) {
return event.data.product_action.action === eventName;
Expand Down

0 comments on commit 3ab029a

Please sign in to comment.