@datadog/mobile-react-native 1.5.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/gradle.properties +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +4 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +6 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdLogs.kt +162 -6
- package/android/src/main/kotlin/com/datadog/reactnative/DdRum.kt +9 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdk.kt +4 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +5 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +4 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdLogsTest.kt +242 -2
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +10 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +6 -2
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +2 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/GenericAssert.kt +2 -2
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +3 -1
- package/ios/Sources/Attributes.swift +7 -0
- package/ios/Sources/DdLogs.m +31 -0
- package/ios/Sources/DdLogs.swift +84 -4
- package/ios/Sources/DdRum.m +3 -0
- package/ios/Sources/DdRum.swift +7 -0
- package/ios/Sources/DdSdk.swift +2 -0
- package/ios/Sources/DdSdkConfiguration.swift +7 -1
- package/ios/Sources/RNDdSdkConfiguration.swift +5 -1
- package/lib/commonjs/DdSdkReactNative.js +5 -1
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/InternalLog.js +6 -2
- package/lib/commonjs/InternalLog.js.map +1 -1
- package/lib/commonjs/errorUtils.js +20 -1
- package/lib/commonjs/errorUtils.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +102 -11
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/logs/eventMapper.js.map +1 -1
- package/lib/commonjs/nativeModulesTypes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +6 -0
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +60 -46
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +2 -2
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +9 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
- package/lib/commonjs/rum/types.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdSdkReactNative.js +5 -1
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/InternalLog.js +2 -1
- package/lib/module/InternalLog.js.map +1 -1
- package/lib/module/errorUtils.js +15 -0
- package/lib/module/errorUtils.js.map +1 -1
- package/lib/module/logs/DdLogs.js +103 -12
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/logs/eventMapper.js.map +1 -1
- package/lib/module/nativeModulesTypes.js.map +1 -1
- package/lib/module/rum/DdRum.js +5 -0
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +61 -46
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js +2 -2
- package/lib/module/rum/instrumentation/interactionTracking/DdEventsInterceptor.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js +9 -1
- package/lib/module/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.js.map +1 -1
- package/lib/module/rum/types.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/InternalLog.d.ts +1 -0
- package/lib/typescript/errorUtils.d.ts +2 -0
- package/lib/typescript/logs/DdLogs.d.ts +13 -5
- package/lib/typescript/logs/eventMapper.d.ts +5 -5
- package/lib/typescript/logs/types.d.ts +34 -8
- package/lib/typescript/nativeModulesTypes.d.ts +44 -4
- package/lib/typescript/rum/DdRum.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts +3 -2
- package/lib/typescript/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts +5 -2
- package/lib/typescript/rum/types.d.ts +4 -0
- package/lib/typescript/types.d.ts +4 -0
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +6 -1
- package/src/InternalLog.tsx +3 -1
- package/src/__tests__/errorUtils.test.ts +49 -0
- package/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx +14 -14
- package/src/__tests__/rum/instrumentation/DdRumErrorTracking.test.tsx +452 -109
- package/src/__tests__/rum/instrumentation/ShallowObjectEqualityChecker.test.ts +18 -0
- package/src/errorUtils.ts +15 -0
- package/src/logs/DdLogs.ts +166 -16
- package/src/logs/__tests__/DdLogs.test.ts +169 -0
- package/src/logs/__tests__/eventMapper.test.ts +34 -0
- package/src/logs/eventMapper.ts +15 -4
- package/src/logs/types.ts +36 -8
- package/src/nativeModulesTypes.ts +73 -4
- package/src/rum/DdRum.ts +5 -0
- package/src/rum/__tests__/DdRum.test.ts +12 -27
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +41 -10
- package/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx +7 -4
- package/src/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.ts +11 -3
- package/src/rum/types.ts +5 -0
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +2 -0
- package/src/types.tsx +2 -0
- package/src/version.ts +1 -1
|
@@ -59,29 +59,65 @@ export declare type DdNativeSdkType = {
|
|
|
59
59
|
*/
|
|
60
60
|
export declare type DdNativeLogsType = {
|
|
61
61
|
/**
|
|
62
|
-
* Send a log with level
|
|
62
|
+
* Send a log with DEBUG level.
|
|
63
63
|
* @param message: The message to send.
|
|
64
64
|
* @param context: The additional context to send.
|
|
65
65
|
*/
|
|
66
66
|
debug(message: string, context?: object): Promise<void>;
|
|
67
67
|
/**
|
|
68
|
-
* Send a log with level
|
|
68
|
+
* Send a log with INFO level.
|
|
69
69
|
* @param message: The message to send.
|
|
70
70
|
* @param context: The additional context to send.
|
|
71
71
|
*/
|
|
72
72
|
info(message: string, context?: object): Promise<void>;
|
|
73
73
|
/**
|
|
74
|
-
* Send a log with level
|
|
74
|
+
* Send a log with WARN level.
|
|
75
75
|
* @param message: The message to send.
|
|
76
76
|
* @param context: The additional context to send.
|
|
77
77
|
*/
|
|
78
78
|
warn(message: string, context?: object): Promise<void>;
|
|
79
79
|
/**
|
|
80
|
-
* Send a log with level
|
|
80
|
+
* Send a log with ERROR level.
|
|
81
81
|
* @param message: The message to send.
|
|
82
82
|
* @param context: The additional context to send.
|
|
83
83
|
*/
|
|
84
84
|
error(message: string, context?: object): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Send a log containing an error with DEBUG level.
|
|
87
|
+
* @param message: The message to send.
|
|
88
|
+
* @param errorKind: The error kind to send.
|
|
89
|
+
* @param errorMessage: The error message to send.
|
|
90
|
+
* @param stacktrace: The stack trace to send.
|
|
91
|
+
* @param context: The additional context to send.
|
|
92
|
+
*/
|
|
93
|
+
debugWithError(message: string, errorKind?: string, errorMessage?: string, stacktrace?: string, context?: object): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Send a log containing an error with INDO level.
|
|
96
|
+
* @param message: The message to send.
|
|
97
|
+
* @param errorKind: The error kind to send.
|
|
98
|
+
* @param errorMessage: The error message to send.
|
|
99
|
+
* @param stacktrace: The stack trace to send.
|
|
100
|
+
* @param context: The additional context to send.
|
|
101
|
+
*/
|
|
102
|
+
infoWithError(message: string, errorKind?: string, errorMessage?: string, stacktrace?: string, context?: object): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Send a log containing an error with WARN level.
|
|
105
|
+
* @param message: The message to send.
|
|
106
|
+
* @param errorKind: The error kind to send.
|
|
107
|
+
* @param errorMessage: The error message to send.
|
|
108
|
+
* @param stacktrace: The stack trace to send.
|
|
109
|
+
* @param context: The additional context to send.
|
|
110
|
+
*/
|
|
111
|
+
warnWithError(message: string, errorKind?: string, errorMessage?: string, stacktrace?: string, context?: object): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Send a log containing an error with ERROR level.
|
|
114
|
+
* @param message: The message to send.
|
|
115
|
+
* @param errorKind: The error kind to send.
|
|
116
|
+
* @param errorMessage: The error message to send.
|
|
117
|
+
* @param stacktrace: The stack trace to send.
|
|
118
|
+
* @param context: The additional context to send.
|
|
119
|
+
*/
|
|
120
|
+
errorWithError(message: string, errorKind?: string, errorMessage?: string, stacktrace?: string, context?: object): Promise<void>;
|
|
85
121
|
};
|
|
86
122
|
/**
|
|
87
123
|
* The entry point to use Datadog's Trace feature.
|
|
@@ -178,6 +214,10 @@ export declare type DdNativeRumType = {
|
|
|
178
214
|
* @param name: The name of the new custom timing attribute. Timings can be nested up to 8 levels deep. Names using more than 8 levels will be sanitized by SDK.
|
|
179
215
|
*/
|
|
180
216
|
addTiming(name: string): Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Stops the current RUM Session.
|
|
219
|
+
*/
|
|
220
|
+
stopSession(): Promise<void>;
|
|
181
221
|
};
|
|
182
222
|
declare type ActionType = 'TAP' | 'SCROLL' | 'SWIPE' | 'BACK' | 'CUSTOM';
|
|
183
223
|
declare type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
|
|
@@ -25,6 +25,7 @@ declare class DdRumWrapper implements DdRumType {
|
|
|
25
25
|
stopResource(key: string, statusCode: number, kind: ResourceKind, size?: number, context?: object, timestampMs?: number, resourceContext?: XMLHttpRequest): Promise<void>;
|
|
26
26
|
addError(message: string, source: ErrorSource, stacktrace: string, context?: object, timestampMs?: number): Promise<void>;
|
|
27
27
|
addTiming(name: string): Promise<void>;
|
|
28
|
+
stopSession(): Promise<void>;
|
|
28
29
|
registerErrorEventMapper(errorEventMapper: ErrorEventMapper): void;
|
|
29
30
|
unregisterErrorEventMapper(): void;
|
|
30
31
|
registerResourceEventMapper(resourceEventMapper: ResourceEventMapper): void;
|
|
@@ -10,6 +10,7 @@ export declare class DdRumErrorTracking {
|
|
|
10
10
|
* Starts tracking errors and sends a RUM Error event every time an error is detected.
|
|
11
11
|
*/
|
|
12
12
|
static startTracking(): void;
|
|
13
|
-
static onGlobalError(error: any, isFatal?: boolean)
|
|
14
|
-
static onConsoleError(...params: unknown[])
|
|
13
|
+
static onGlobalError: (error: any, isFatal?: boolean) => void;
|
|
14
|
+
static onConsoleError: (...params: unknown[]) => void;
|
|
15
|
+
private static reportError;
|
|
15
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type EventsInterceptor from './EventsInterceptor';
|
|
2
2
|
export declare const UNKNOWN_TARGET_NAME = "unknown_target";
|
|
3
3
|
export declare class DdEventsInterceptor implements EventsInterceptor {
|
|
4
|
-
static
|
|
4
|
+
static ACTION_EVENT_DROPPED_DEBUG_MESSAGE: string;
|
|
5
5
|
private debouncingStartedTimestamp;
|
|
6
6
|
interceptOnPress(...args: any[]): void;
|
|
7
7
|
private handleTargetEvent;
|
package/lib/typescript/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Does a shallow comparison between 2 objects
|
|
2
|
+
* Does a shallow comparison between 2 objects.
|
|
3
|
+
*
|
|
4
|
+
* In some rare cases, one of the objects can be `undefined` or `null`.
|
|
5
|
+
* This is documented in https://github.com/DataDog/dd-sdk-reactnative/issues/419.
|
|
3
6
|
*/
|
|
4
|
-
export declare const areObjectShallowEqual: (objectA: Record<string, unknown
|
|
7
|
+
export declare const areObjectShallowEqual: (objectA: Record<string, unknown> | undefined | null, objectB: Record<string, unknown> | undefined | null) => boolean;
|
|
@@ -84,6 +84,10 @@ export declare type DdRumType = {
|
|
|
84
84
|
* @param name: The name of the new custom timing attribute. Timings can be nested up to 8 levels deep. Names using more than 8 levels will be sanitized by SDK.
|
|
85
85
|
*/
|
|
86
86
|
addTiming(name: string): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Stops the current RUM Session.
|
|
89
|
+
*/
|
|
90
|
+
stopSession(): Promise<void>;
|
|
87
91
|
};
|
|
88
92
|
/**
|
|
89
93
|
* Describe the type of a RUM Action.
|
|
@@ -20,12 +20,16 @@ export declare class DdSdkConfiguration {
|
|
|
20
20
|
trackErrors: boolean;
|
|
21
21
|
trackInteractions: boolean;
|
|
22
22
|
trackNetworkRequests: boolean;
|
|
23
|
+
reactVersion: string;
|
|
24
|
+
reactNativeVersion: string;
|
|
23
25
|
};
|
|
24
26
|
constructor(clientToken: string, env: string, applicationId: string, nativeCrashReportEnabled: boolean, nativeLongTaskThresholdMs: number, longTaskThresholdMs: number, sampleRate: number, site: string, trackingConsent: string, additionalConfig: object, telemetrySampleRate: number, vitalsUpdateFrequency: string, trackFrustrations: boolean, configurationForTelemetry: {
|
|
25
27
|
initializationType: string;
|
|
26
28
|
trackErrors: boolean;
|
|
27
29
|
trackInteractions: boolean;
|
|
28
30
|
trackNetworkRequests: boolean;
|
|
31
|
+
reactVersion: string;
|
|
32
|
+
reactNativeVersion: string;
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.6.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A client-side React Native module to interact with Datadog",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datadog",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
]
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "b95779b45f4917992f898f426a6640472b77cc3d"
|
|
81
81
|
}
|
package/src/DdSdkReactNative.tsx
CHANGED
|
@@ -123,7 +123,12 @@ export class DdSdkReactNative {
|
|
|
123
123
|
initializationType: params.initializationModeForTelemetry,
|
|
124
124
|
trackErrors: configuration.trackErrors,
|
|
125
125
|
trackInteractions: configuration.trackInteractions,
|
|
126
|
-
trackNetworkRequests: configuration.trackResources
|
|
126
|
+
trackNetworkRequests: configuration.trackResources,
|
|
127
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
128
|
+
reactNativeVersion: require('react-native/package.json')
|
|
129
|
+
.version,
|
|
130
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
131
|
+
reactVersion: require('react/package.json').version
|
|
127
132
|
}
|
|
128
133
|
)
|
|
129
134
|
);
|
package/src/InternalLog.tsx
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { SdkVerbosity } from './SdkVerbosity';
|
|
8
8
|
|
|
9
|
+
export const DATADOG_MESSAGE_PREFIX = 'DATADOG:';
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* /!\ DO NOT USE THIS IN YOUR APP /!\\
|
|
11
13
|
*
|
|
@@ -30,7 +32,7 @@ export class InternalLog {
|
|
|
30
32
|
if (allowedLevel === undefined || requiredLevel === undefined) {
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
|
-
const prefixedMessage =
|
|
35
|
+
const prefixedMessage = `${DATADOG_MESSAGE_PREFIX} ${message}`;
|
|
34
36
|
if (verbosity === SdkVerbosity.ERROR && requiredLevel >= allowedLevel) {
|
|
35
37
|
console.error(prefixedMessage);
|
|
36
38
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { getErrorName } from '../errorUtils';
|
|
8
|
+
|
|
9
|
+
describe('errorUtils', () => {
|
|
10
|
+
describe('getErrorName', () => {
|
|
11
|
+
it('returns the error.name if defined', () => {
|
|
12
|
+
let error;
|
|
13
|
+
try {
|
|
14
|
+
// eslint-disable-next-line no-unused-expressions
|
|
15
|
+
error.bad.property;
|
|
16
|
+
} catch (e) {
|
|
17
|
+
// error will be a TypeError
|
|
18
|
+
error = e;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
expect(getErrorName(error)).toBe('TypeError');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('returns the error.name if defined by an extension', () => {
|
|
25
|
+
class CustomError extends Error {
|
|
26
|
+
name = 'CustomError';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const error = new CustomError('some custom error');
|
|
30
|
+
expect(getErrorName(error)).toBe('CustomError');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('returns "Error" for an Error object', () => {
|
|
34
|
+
const error = new Error('some error');
|
|
35
|
+
expect(getErrorName(error)).toBe('Error');
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('returns "Error" for an object without a name property', () => {
|
|
39
|
+
const error = { message: 'some error' };
|
|
40
|
+
expect(getErrorName(error)).toBe('Error');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('returns "Error" for an non object types', () => {
|
|
44
|
+
expect(getErrorName(undefined)).toBe('Error');
|
|
45
|
+
expect(getErrorName(null)).toBe('Error');
|
|
46
|
+
expect(getErrorName('some error')).toBe('Error');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -186,9 +186,9 @@ it('M do nothing W interceptOnPress { invalid arguments - empty object } ', asyn
|
|
|
186
186
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
187
187
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
188
188
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
189
|
-
DdEventsInterceptor.
|
|
189
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
190
190
|
);
|
|
191
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
191
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
192
192
|
});
|
|
193
193
|
|
|
194
194
|
it('M do nothing W interceptOnPress { invalid arguments - array } ', async () => {
|
|
@@ -202,9 +202,9 @@ it('M do nothing W interceptOnPress { invalid arguments - array } ', async () =>
|
|
|
202
202
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
203
203
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
204
204
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
205
|
-
DdEventsInterceptor.
|
|
205
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
206
206
|
);
|
|
207
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
207
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
208
208
|
});
|
|
209
209
|
|
|
210
210
|
it('M do nothing W interceptOnPress { invalid arguments - nested array } ', async () => {
|
|
@@ -218,9 +218,9 @@ it('M do nothing W interceptOnPress { invalid arguments - nested array } ', asyn
|
|
|
218
218
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
219
219
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
220
220
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
221
|
-
DdEventsInterceptor.
|
|
221
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
222
222
|
);
|
|
223
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
223
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
224
224
|
});
|
|
225
225
|
|
|
226
226
|
it('M do nothing W interceptOnPress { invalid arguments - undefined } ', async () => {
|
|
@@ -234,9 +234,9 @@ it('M do nothing W interceptOnPress { invalid arguments - undefined } ', async (
|
|
|
234
234
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
235
235
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
236
236
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
237
|
-
DdEventsInterceptor.
|
|
237
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
238
238
|
);
|
|
239
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
239
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
240
240
|
});
|
|
241
241
|
|
|
242
242
|
it('M do nothing W interceptOnPress { invalid arguments - null } ', async () => {
|
|
@@ -250,9 +250,9 @@ it('M do nothing W interceptOnPress { invalid arguments - null } ', async () =>
|
|
|
250
250
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
251
251
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
252
252
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
253
|
-
DdEventsInterceptor.
|
|
253
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
254
254
|
);
|
|
255
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
255
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
it('M do nothing W interceptOnPress { invalid arguments - wrong object } ', async () => {
|
|
@@ -263,9 +263,9 @@ it('M do nothing W interceptOnPress { invalid arguments - wrong object } ', asyn
|
|
|
263
263
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
264
264
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
265
265
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
266
|
-
DdEventsInterceptor.
|
|
266
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
267
267
|
);
|
|
268
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
268
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
269
269
|
});
|
|
270
270
|
|
|
271
271
|
it('M do nothing W interceptOnPress { no arguments call } ', async () => {
|
|
@@ -276,7 +276,7 @@ it('M do nothing W interceptOnPress { no arguments call } ', async () => {
|
|
|
276
276
|
expect(DdRum.addAction.mock.calls.length).toBe(0);
|
|
277
277
|
expect(InternalLog.log.mock.calls.length).toBe(1);
|
|
278
278
|
expect(InternalLog.log.mock.calls[0][0]).toBe(
|
|
279
|
-
DdEventsInterceptor.
|
|
279
|
+
DdEventsInterceptor.ACTION_EVENT_DROPPED_DEBUG_MESSAGE
|
|
280
280
|
);
|
|
281
|
-
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.
|
|
281
|
+
expect(InternalLog.log.mock.calls[0][1]).toBe(SdkVerbosity.DEBUG);
|
|
282
282
|
});
|