appcenter-analytics
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -23,2 +23,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
test('trackEvent with properties filters null values when sanitized', async () => { | ||
const eventName = 'Event with null value'; | ||
const eventProperties = { | ||
string: 'value', number: 1, boolean: true, nothing: null | ||
}; | ||
const expectedProperties = { string: 'value', number: '1', boolean: 'true' }; | ||
const spy = jest.spyOn(NativeModules.AppCenterReactNativeAnalytics, 'trackEvent'); | ||
await Analytics.trackEvent(eventName, eventProperties); | ||
expect(spy).toHaveBeenCalledWith(eventName, expectedProperties); | ||
}); | ||
test('trackEvent with null properties are sanitized', async () => { | ||
@@ -25,0 +36,0 @@ const eventName = 'Test event'; |
@@ -125,3 +125,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
} | ||
Object.keys(props).forEach((key) => { | ||
Object.keys(props).filter((key) => props[key] !== null).forEach((key) => { | ||
switch (typeof props[key]) { | ||
@@ -128,0 +128,0 @@ case 'string': |
{ | ||
"name": "appcenter-analytics", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "React Native plugin for AppCenter Analytics", | ||
@@ -23,3 +23,3 @@ "main": "Analytics.js", | ||
"dependencies": { | ||
"appcenter": "2.5.0" | ||
"appcenter": "2.6.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "rnpm": { |
@@ -37,4 +37,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
[ | ||
{ pod: 'AppCenter/Analytics', version: '2.5.0' }, | ||
{ pod: 'AppCenterReactNativeShared', version: '2.5.0' } // in case people don't link appcenter (core) | ||
{ pod: 'AppCenter/Analytics', version: '2.5.1' }, | ||
{ pod: 'AppCenterReactNativeShared', version: '2.6.0' } // in case people don't link appcenter (core) | ||
], | ||
@@ -41,0 +41,0 @@ { platform: 'ios', version: '9.0' } |
Sorry, the diff of this file is not supported yet
56417
658
+ Addedappcenter@2.6.0(transitive)
+ Addedappcenter-link-scripts@2.6.0(transitive)
- Removedappcenter@2.5.0(transitive)
- Removedappcenter-link-scripts@2.5.0(transitive)
Updatedappcenter@2.6.0